Merge pull request #22524 from wizeman/u/chrony-impr

nixos.chrony: add extraFlags config option
This commit is contained in:
Franz Pletz 2017-02-07 21:50:58 +01:00 committed by GitHub
commit 626540e32e

View file

@ -23,13 +23,14 @@ let
driftfile ${stateDir}/chrony.drift
keyfile ${keyFile}
generatecommandkey
${optionalString (!config.time.hardwareClockInLocalTime) "rtconutc"}
${cfg.extraConfig}
'';
chronyFlags = "-n -m -u chrony -f ${configFile} ${toString cfg.extraFlags}";
in
{
@ -76,6 +77,13 @@ in
<literal>chrony.conf</literal>
'';
};
extraFlags = mkOption {
default = [];
example = [ "-s" ];
type = types.listOf types.str;
description = "Extra flags passed to the chronyd command.";
};
};
};
@ -123,7 +131,7 @@ in
'';
serviceConfig =
{ ExecStart = "${pkgs.chrony}/bin/chronyd -n -m -u chrony -f ${configFile}";
{ ExecStart = "${pkgs.chrony}/bin/chronyd ${chronyFlags}";
};
};