commit 1bca07250942eca6e4048c361317b2d804bc1c64
parent 7b9872464337d11e7361f801b4580fe0c69e4c79
Author: Daniel Barlow <dan@telent.net>
Date: Thu, 17 Oct 2024 21:35:33 +0100
fix chrony pidfile error
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/ntp/service.nix b/modules/ntp/service.nix
@@ -6,6 +6,7 @@
}:
params:
let
+ name = "ntp"; # bad name, needs to be unique
inherit (liminix.services) longrun;
inherit (lib) concatStringsSep mapAttrsToList;
configFile = p:
@@ -23,11 +24,15 @@ let
++ (lib.optional (p.bindaddress != null) "bindaddress ${p.bindaddress}")
++ (lib.optional (p.binddevice != null) "binddevice ${p.binddevice}")
++ (lib.optional (p.dumpdir != null) "dumpdir ${p.dumpdir}")
+ ++ [
+ "bindcmdaddress /" # disable unix socket
+ "pidfile /run/${name}.pid"
+ ]
++ [p.extraConfig];
config = writeText "chrony.conf"
(concatStringsSep "\n" (configFile params));
in longrun {
- name = "ntp"; # bad name, needs to be unique
+ inherit name;
run = "${chrony}/bin/chronyd -f ${config} -d";
}