testing: some usability improvements

This commit is contained in:
Michele Guerini Rocco 2021-06-17 19:05:24 +02:00
parent 89633d5cd5
commit cc0fb9637e
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -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" # activation scripts at runtime.
"-serial mon:stdio" "-virtfs local,path=${secrets},security_model=none,mount_tag=secrets"
];
# Ensure secrets are accessible by the virtualisation.fileSystems."${secrets}" =
# activation scripts at runtime. { device = "secrets";
"-virtfs local,path=${secrets},security_model=none,mount_tag=secrets" fsType = "9p";
]; options = [ "trans=virtio" "version=9p2000.L" ];
neededForBoot = true;
};
fileSystems = lib.mkVMOverride { # Automatically resize the console
"${secrets}" = environment.systemPackages = [ pkgs.xterm ];
{ device = "secrets"; environment.shellInit = "resize > /dev/null";
fsType = "9p";
options = [ "trans=virtio" "version=9p2000.L" ];
neededForBoot = true;
};
};
} }