diff --git a/modules/config/timezone.nix b/modules/config/timezone.nix index 5dcf38c462d..bb03074a4ae 100644 --- a/modules/config/timezone.nix +++ b/modules/config/timezone.nix @@ -5,13 +5,19 @@ with pkgs.lib; { options = { - time.timeZone = mkOption { - default = "CET"; - type = with types; uniq string; - example = "America/New_York"; - description = "The time zone used when displaying times and dates."; - }; + time = { + timeZone = mkOption { + default = "CET"; + type = with types; uniq string; + example = "America/New_York"; + description = "The time zone used when displaying times and dates."; + }; + clockLocal = mkOption { + default = false; + description = "Keep the Hardware Clock in local time instead of UTC"; + }; + }; }; config = { diff --git a/modules/system/upstart-events/shutdown.nix b/modules/system/upstart-events/shutdown.nix index 8aa794378ed..bfe8d073a82 100644 --- a/modules/system/upstart-events/shutdown.nix +++ b/modules/system/upstart-events/shutdown.nix @@ -73,7 +73,7 @@ with pkgs.lib; # Set the hardware clock to the system time. echo "setting the hardware clock..." - hwclock --systohc --utc + hwclock --systohc ${if config.time.clockLocal then "--localtime" else "--utc"} # Stop all swap devices.