diff options
author | (cdep)illabout <cdep.illabout@gmail.com> | 2019-11-20 14:57:02 +0900 |
---|---|---|
committer | (cdep)illabout <cdep.illabout@gmail.com> | 2019-11-20 14:57:02 +0900 |
commit | 6c019a867c330f9ffc6049f8ddb35fe778046929 (patch) | |
tree | 559218bcc68b88f124d15001b3d9e321e5115d38 /nixos/modules/system | |
parent | 4414a3bc7cbe98c2c27065a2a97ae1fcd1a08e56 (diff) |
nixos/timesyncd: add extraConfig option
This adds an `extraConfig` option to timesyncd for setting additional options in `/etc/systemd/timesyncd.conf`. This is similar to things like `services.journald.extraConfig` and `services.logind.extraConfig`.
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/timesyncd.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/timesyncd.nix b/nixos/modules/system/boot/timesyncd.nix index 8282cdd6f3aad..0b1d0ff6c22b8 100644 --- a/nixos/modules/system/boot/timesyncd.nix +++ b/nixos/modules/system/boot/timesyncd.nix @@ -20,6 +20,18 @@ with lib; The set of NTP servers from which to synchronise. ''; }; + extraConfig = mkOption { + default = ""; + type = types.lines; + example = '' + PollIntervalMaxSec=180 + ''; + description = '' + Extra config options for systemd-timesyncd. See + <link xlink:href="https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html"> + timesyncd.conf(5)</link> for available options. + ''; + }; }; }; @@ -35,6 +47,7 @@ with lib; environment.etc."systemd/timesyncd.conf".text = '' [Time] NTP=${concatStringsSep " " config.services.timesyncd.servers} + ${config.services.timesyncd.extraConfig} ''; users.users.systemd-timesync.uid = config.ids.uids.systemd-timesync; |