add first version of ntp module

This commit is contained in:
Daniel Barlow
2023-07-22 23:22:45 +01:00
parent e952f55f40
commit bf1d9beec1
4 changed files with 103 additions and 20 deletions

View File

@@ -38,6 +38,7 @@ in rec {
../modules/firewall
../modules/hostapd
../modules/bridge
../modules/ntp
];
rootfsType = "jffs2";
hostname = "rotuer";
@@ -95,16 +96,10 @@ in rec {
];
};
services.ntp =
let config = writeText "chrony.conf" ''
pool pool.ntp.org iburst
dumpdir /run/chrony
makestep 1.0 3
'';
in longrun {
name = "ntp";
run = "${pkgs.chrony}/bin/chronyd -f ${config} -d";
};
services.ntp = svc.ntp {
pools = { "pool.ntp.org" = ["iburst"]; };
makestep = { threshold = 1.0; limit = 3; };
};
services.sshd = longrun {
name = "sshd";