Add option to keep hardware clock in local time.
This commit is contained in:
parent
5412b1089f
commit
008493f94c
@ -5,13 +5,19 @@ with pkgs.lib;
|
|||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
time.timeZone = mkOption {
|
time = {
|
||||||
default = "CET";
|
timeZone = mkOption {
|
||||||
type = with types; uniq string;
|
default = "CET";
|
||||||
example = "America/New_York";
|
type = with types; uniq string;
|
||||||
description = "The time zone used when displaying times and dates.";
|
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 = {
|
config = {
|
||||||
|
@ -73,7 +73,7 @@ with pkgs.lib;
|
|||||||
|
|
||||||
# Set the hardware clock to the system time.
|
# Set the hardware clock to the system time.
|
||||||
echo "setting the hardware clock..."
|
echo "setting the hardware clock..."
|
||||||
hwclock --systohc --utc
|
hwclock --systohc ${if config.time.clockLocal then "--localtime" else "--utc"}
|
||||||
|
|
||||||
|
|
||||||
# Stop all swap devices.
|
# Stop all swap devices.
|
||||||
|
Loading…
Reference in New Issue
Block a user