Add a baseRtc option so set the VM clock

This commit is contained in:
adisbladis 2020-05-03 15:25:59 +01:00 committed by Stephan Maka
parent 9e6775fe8d
commit 3e7e6941b8
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@
, autoUnattendParams ? {}
, packages ? []
, impureMode ? false
, baseRtc ? "2020-04-20T14:21:42"
, ...
}@attrs:
@ -145,6 +146,8 @@ let
"usb-storage,drive=virtio-win"
# "CD" drive with windows features-on-demand
# "-cdrom" "${fodIso}"
# Set the base clock inside the VM
"-rtc=$(date -Iseconds -d @${baseRtc}"
] ++ lib.optional (!impureMode) "-nographic";
in
''