git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #73802 from cdepillabout/add-extraconfig-to-timesyncd

nixos/timesyncd: add extraConfig option

commit58fb23f72ad916c8bbfa3c3bc2d0c83c9cfcdd16 authorAndreas Rammhold <andreas@rammhold.de> dateWed 20 Nov 2019, 08:40 (7 years ago) parent09f9bcd6c019a8
1 file changed+13
nixos/modules/system/boot/timesyncd.nix+13
nixos/modules/system/boot/timesyncd.nix+13
@@ -20,6 +20,18 @@ with lib;
2020 The set of NTP servers from which to synchronise.
2121 '';
2222 };
23+ extraConfig = mkOption {
24+ default = "";
25+ type = types.lines;
26+ example = ''
27+ PollIntervalMaxSec=180
28+ '';
29+ description = ''
30+ Extra config options for systemd-timesyncd. See
31+ <link xlink:href="https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html">
32+ timesyncd.conf(5)</link> for available options.
33+ '';
34+ };
2335 };
2436 };
2537
@@ -35,6 +47,7 @@ with lib;
3547 environment.etc."systemd/timesyncd.conf".text = ''
3648 [Time]
3749 NTP=${concatStringsSep " " config.services.timesyncd.servers}
50+ ${config.services.timesyncd.extraConfig}
3851 '';
3952
4053 users.users.systemd-timesync.uid = config.ids.uids.systemd-timesync;