]> git.scottworley.com Git - nixos-qemu-vm-isolation/blob - checks/mount-grep.nix
Use a squashfs Nix Store rather than a virtio host mount
[nixos-qemu-vm-isolation] / checks / mount-grep.nix
1 { pkgs, ... }: {
2 name = "qemu-private-store-mount-grep";
3
4 nodes = {
5 shared = _: { };
6 private = _: { imports = [ ../modules/qemu-vm-isolation.nix ]; };
7 };
8
9 testScript = ''
10 start_all()
11 shared.wait_for_unit("multi-user.target")
12 private.wait_for_unit("multi-user.target")
13
14 shared.succeed("[[ $(mount | grep -c virt) -gt 0 ]]")
15 private.succeed("[[ $(mount | grep -c virt) -eq 0 ]]")
16 '';
17 }