Merge pull request #73802 from cdepillabout/add-extraconfig-to-timesyncd
nixos/timesyncd: add extraConfig option
This commit is contained in:
commit
58fb23f72a
@ -20,6 +20,18 @@ with lib;
|
|||||||
The set of NTP servers from which to synchronise.
|
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 = ''
|
environment.etc."systemd/timesyncd.conf".text = ''
|
||||||
[Time]
|
[Time]
|
||||||
NTP=${concatStringsSep " " config.services.timesyncd.servers}
|
NTP=${concatStringsSep " " config.services.timesyncd.servers}
|
||||||
|
${config.services.timesyncd.extraConfig}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
users.users.systemd-timesync.uid = config.ids.uids.systemd-timesync;
|
users.users.systemd-timesync.uid = config.ids.uids.systemd-timesync;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user