Loading nixos/modules/config/locale.nix +9 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,15 @@ in // lib.optionalAttrs (config.time.timeZone != null) { localtime.source = "/etc/zoneinfo/${config.time.timeZone}"; localtime.mode = "direct-symlink"; } // lib.optionalAttrs config.time.hardwareClockInLocalTime { # Mirrors timedated # https://github.com/systemd/systemd/blob/afaca649ad678031a46182b0cce667cbbbf47a6d/src/timedate/timedated.c#L325-L396 adjtime.text = '' 0.0 0 0 0 LOCAL ''; }; }; Loading nixos/modules/services/networking/ntp/chrony.nix +0 −5 Original line number Diff line number Diff line Loading @@ -264,11 +264,6 @@ in services.timesyncd.enable = lib.mkForce false; # If chrony controls and tracks the RTC, writing it externally causes clock error. systemd.services.save-hwclock = lib.mkIf cfg.enableRTCTrimming { enable = lib.mkForce false; }; systemd.services.systemd-timedated.environment = { SYSTEMD_TIMEDATED_NTP_SERVICES = "chronyd.service"; }; Loading nixos/modules/system/boot/shutdown.nix +0 −23 Original line number Diff line number Diff line { config, lib, pkgs, ... }: { # This unit saves the value of the system clock to the hardware # clock on shutdown. systemd.services.save-hwclock = { description = "Save Hardware Clock"; wantedBy = [ "shutdown.target" ]; unitConfig = { DefaultDependencies = false; ConditionPathExists = "/dev/rtc"; ConditionPathIsReadWrite = "/etc/"; }; serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.util-linux}/sbin/hwclock --systohc ${ if config.time.hardwareClockInLocalTime then "--localtime" else "--utc" }"; }; }; boot.kernel.sysctl."kernel.poweroff_cmd" = "${config.systemd.package}/sbin/poweroff"; } Loading
nixos/modules/config/locale.nix +9 −0 Original line number Diff line number Diff line Loading @@ -96,6 +96,15 @@ in // lib.optionalAttrs (config.time.timeZone != null) { localtime.source = "/etc/zoneinfo/${config.time.timeZone}"; localtime.mode = "direct-symlink"; } // lib.optionalAttrs config.time.hardwareClockInLocalTime { # Mirrors timedated # https://github.com/systemd/systemd/blob/afaca649ad678031a46182b0cce667cbbbf47a6d/src/timedate/timedated.c#L325-L396 adjtime.text = '' 0.0 0 0 0 LOCAL ''; }; }; Loading
nixos/modules/services/networking/ntp/chrony.nix +0 −5 Original line number Diff line number Diff line Loading @@ -264,11 +264,6 @@ in services.timesyncd.enable = lib.mkForce false; # If chrony controls and tracks the RTC, writing it externally causes clock error. systemd.services.save-hwclock = lib.mkIf cfg.enableRTCTrimming { enable = lib.mkForce false; }; systemd.services.systemd-timedated.environment = { SYSTEMD_TIMEDATED_NTP_SERVICES = "chronyd.service"; }; Loading
nixos/modules/system/boot/shutdown.nix +0 −23 Original line number Diff line number Diff line { config, lib, pkgs, ... }: { # This unit saves the value of the system clock to the hardware # clock on shutdown. systemd.services.save-hwclock = { description = "Save Hardware Clock"; wantedBy = [ "shutdown.target" ]; unitConfig = { DefaultDependencies = false; ConditionPathExists = "/dev/rtc"; ConditionPathIsReadWrite = "/etc/"; }; serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.util-linux}/sbin/hwclock --systohc ${ if config.time.hardwareClockInLocalTime then "--localtime" else "--utc" }"; }; }; boot.kernel.sysctl."kernel.poweroff_cmd" = "${config.systemd.package}/sbin/poweroff"; }