testing: some usability improvements
This commit is contained in:
parent
89633d5cd5
commit
cc0fb9637e
19
testing.nix
19
testing.nix
@ -1,4 +1,4 @@
|
|||||||
{ lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
secrets = toString ./secrets;
|
secrets = toString ./secrets;
|
||||||
@ -11,24 +11,23 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.memorySize = "4000"; # MB
|
virtualisation.memorySize = "4000"; # MB
|
||||||
|
virtualisation.graphics = false;
|
||||||
|
|
||||||
virtualisation.qemu.options = [
|
virtualisation.qemu.options =
|
||||||
# Use serial console to access the VM
|
[ # Ensure secrets are accessible by the
|
||||||
"-display none"
|
|
||||||
"-serial mon:stdio"
|
|
||||||
|
|
||||||
# Ensure secrets are accessible by the
|
|
||||||
# activation scripts at runtime.
|
# activation scripts at runtime.
|
||||||
"-virtfs local,path=${secrets},security_model=none,mount_tag=secrets"
|
"-virtfs local,path=${secrets},security_model=none,mount_tag=secrets"
|
||||||
];
|
];
|
||||||
|
|
||||||
fileSystems = lib.mkVMOverride {
|
virtualisation.fileSystems."${secrets}" =
|
||||||
"${secrets}" =
|
|
||||||
{ device = "secrets";
|
{ device = "secrets";
|
||||||
fsType = "9p";
|
fsType = "9p";
|
||||||
options = [ "trans=virtio" "version=9p2000.L" ];
|
options = [ "trans=virtio" "version=9p2000.L" ];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
# Automatically resize the console
|
||||||
|
environment.systemPackages = [ pkgs.xterm ];
|
||||||
|
environment.shellInit = "resize > /dev/null";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user