nixos.chrony: add extraFlags config option

This commit is contained in:
Ricardo M. Correia 2017-02-07 17:07:20 +01:00
parent 3aff6c07ab
commit e3fce56047

View File

@ -30,6 +30,8 @@ let
${cfg.extraConfig}
'';
chronyFlags = "-n -m -u chrony -f ${configFile} ${toString cfg.extraFlags}";
in
{
@ -76,6 +78,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 +132,7 @@ in
'';
serviceConfig =
{ ExecStart = "${pkgs.chrony}/bin/chronyd -n -m -u chrony -f ${configFile}";
{ ExecStart = "${pkgs.chrony}/bin/chronyd ${chronyFlags}";
};
};