Skip to content

Commit

Permalink
Merge pull request #73802 from cdepillabout/add-extraconfig-to-timesyncd
Browse files Browse the repository at this point in the history
nixos/timesyncd: add extraConfig option
  • Loading branch information
andir authored Nov 20, 2019
2 parents 09f9bcd + 6c019a8 commit 58fb23f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nixos/modules/system/boot/timesyncd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
'';
};
};
};

Expand All @@ -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;
Expand Down

0 comments on commit 58fb23f

Please sign in to comment.