mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
nixos/timesyncd: minor refactoring
This commit is contained in:
parent
473bffa247
commit
45c0d04735
1 changed files with 6 additions and 3 deletions
|
@ -2,6 +2,9 @@
|
|||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.timesyncd;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
|
@ -41,7 +44,7 @@ with lib;
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf config.services.timesyncd.enable {
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd.additionalUpstreamSystemUnits = [ "systemd-timesyncd.service" ];
|
||||
|
||||
|
@ -82,8 +85,8 @@ with lib;
|
|||
|
||||
environment.etc."systemd/timesyncd.conf".text = ''
|
||||
[Time]
|
||||
NTP=${concatStringsSep " " config.services.timesyncd.servers}
|
||||
${config.services.timesyncd.extraConfig}
|
||||
NTP=${concatStringsSep " " cfg.servers}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
|
||||
users.users.systemd-timesync = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue