forked from M-Labs/nix-scripts
wfvm: support disabling fake RTC
Avoids SSL 'certificate not yet valid' errors.
This commit is contained in:
parent
d895203b5b
commit
bd8fa5d955
|
@ -63,7 +63,7 @@ rec {
|
||||||
wfvm@localhost:$1 .
|
wfvm@localhost:$1 .
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wfvm-run = { name, image, script, display ? false, isolateNetwork ? true, forwardedPorts ? [] }:
|
wfvm-run = { name, image, script, display ? false, isolateNetwork ? true, forwardedPorts ? [], fakeRtc ? true }:
|
||||||
let
|
let
|
||||||
restrict =
|
restrict =
|
||||||
if isolateNetwork
|
if isolateNetwork
|
||||||
|
@ -75,7 +75,7 @@ rec {
|
||||||
(map ({ listenAddr, targetAddr, port }:
|
(map ({ listenAddr, targetAddr, port }:
|
||||||
",guestfwd=tcp:${listenAddr}:${toString port}-cmd:${pkgs.socat}/bin/socat\\ -\\ tcp:${targetAddr}:${toString port}"
|
",guestfwd=tcp:${listenAddr}:${toString port}-cmd:${pkgs.socat}/bin/socat\\ -\\ tcp:${targetAddr}:${toString port}"
|
||||||
) forwardedPorts);
|
) forwardedPorts);
|
||||||
qemuParams = mkQemuFlags (pkgs.lib.optional (!display) "-display none" ++ [
|
qemuParams = mkQemuFlags (pkgs.lib.optional (!display) "-display none" ++ pkgs.lib.optional (!fakeRtc) "-rtc base=localtime" ++ [
|
||||||
"-drive"
|
"-drive"
|
||||||
"file=${image},index=0,media=disk,cache=unsafe"
|
"file=${image},index=0,media=disk,cache=unsafe"
|
||||||
"-snapshot"
|
"-snapshot"
|
||||||
|
|
Loading…
Reference in New Issue