add configuration for VM test
This commit is contained in:
parent
6a19f59f14
commit
2451fc262b
27
testing.nix
Normal file
27
testing.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
secrets = toString ./secrets;
|
||||
in
|
||||
|
||||
{
|
||||
imports = [
|
||||
<nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
|
||||
./configuration.nix
|
||||
];
|
||||
|
||||
# Ensure secrets are accessible by the
|
||||
# activation scripts at runtime.
|
||||
virtualisation.qemu.options = [
|
||||
"-virtfs local,path=${secrets},security_model=none,mount_tag=secrets"
|
||||
];
|
||||
fileSystems = lib.mkVMOverride {
|
||||
"${secrets}" =
|
||||
{ device = "secrets";
|
||||
fsType = "9p";
|
||||
options = [ "trans=virtio" "version=9p2000.L" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user