Loading nixos/tests/hibernate.nix +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ in makeTest { # Small root disk for installer 512 ]; virtualisation.bootDevice = "/dev/vdb"; virtualisation.rootDevice = "/dev/vdb"; }; }; Loading nixos/tests/initrd-luks-empty-passphrase.nix +5 −5 Original line number Diff line number Diff line Loading @@ -30,26 +30,26 @@ in { specialisation.boot-luks-wrong-keyfile.configuration = { boot.initrd.luks.devices = lib.mkVMOverride { cryptroot = { device = "/dev/vdc"; device = "/dev/vdb"; keyFile = "/etc/cryptroot.key"; tryEmptyPassphrase = true; fallbackToPassword = !systemdStage1; }; }; virtualisation.bootDevice = "/dev/mapper/cryptroot"; virtualisation.rootDevice = "/dev/mapper/cryptroot"; boot.initrd.secrets."/etc/cryptroot.key" = keyfile; }; specialisation.boot-luks-missing-keyfile.configuration = { boot.initrd.luks.devices = lib.mkVMOverride { cryptroot = { device = "/dev/vdc"; device = "/dev/vdb"; keyFile = "/etc/cryptroot.key"; tryEmptyPassphrase = true; fallbackToPassword = !systemdStage1; }; }; virtualisation.bootDevice = "/dev/mapper/cryptroot"; virtualisation.rootDevice = "/dev/mapper/cryptroot"; }; }; Loading @@ -76,7 +76,7 @@ in { # Create encrypted volume machine.wait_for_unit("multi-user.target") machine.succeed("echo "" | cryptsetup luksFormat /dev/vdc --batch-mode") machine.succeed("echo "" | cryptsetup luksFormat /dev/vdb --batch-mode") machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks-wrong-keyfile.conf") machine.succeed("sync") machine.crash() Loading nixos/tests/installer.nix +2 −1 Original line number Diff line number Diff line Loading @@ -316,8 +316,9 @@ let # installer. This ensures the target disk (/dev/vda) is # the same during and after installation. virtualisation.emptyDiskImages = [ 512 ]; virtualisation.bootDevice = virtualisation.rootDevice = if grubVersion == 1 then "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive2" else "/dev/vdb"; virtualisation.bootLoaderDevice = "/dev/vda"; virtualisation.qemu.diskInterface = if grubVersion == 1 then "scsi" else "virtio"; Loading nixos/tests/luks.nix +4 −4 Original line number Diff line number Diff line Loading @@ -18,10 +18,10 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { boot-luks.configuration = { boot.initrd.luks.devices = lib.mkVMOverride { # We have two disks and only type one password - key reuse is in place cryptroot.device = "/dev/vdc"; cryptroot2.device = "/dev/vdd"; cryptroot.device = "/dev/vdb"; cryptroot2.device = "/dev/vdc"; }; virtualisation.bootDevice = "/dev/mapper/cryptroot"; virtualisation.rootDevice = "/dev/mapper/cryptroot"; }; boot-luks-custom-keymap.configuration = lib.mkMerge [ boot-luks.configuration Loading @@ -37,8 +37,8 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { testScript = '' # Create encrypted volume machine.wait_for_unit("multi-user.target") machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdb -") machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdc -") machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdd -") # Boot from the encrypted disk machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks.conf") Loading nixos/tests/lvm2/systemd-stage-1.nix +4 −4 Original line number Diff line number Diff line { kernelPackages ? null, flavour }: let preparationCode = { raid = '' machine.succeed("vgcreate test_vg /dev/vdc /dev/vdd") machine.succeed("vgcreate test_vg /dev/vdb /dev/vdc") machine.succeed("lvcreate -L 512M --type raid0 test_vg -n test_lv") ''; thinpool = '' machine.succeed("vgcreate test_vg /dev/vdc") machine.succeed("vgcreate test_vg /dev/vdb") machine.succeed("lvcreate -L 512M -T test_vg/test_thin_pool") machine.succeed("lvcreate -n test_lv -V 16G --thinpool test_thin_pool test_vg") ''; vdo = '' machine.succeed("vgcreate test_vg /dev/vdc") machine.succeed("vgcreate test_vg /dev/vdb") machine.succeed("lvcreate --type vdo -n test_lv -L 6G -V 12G test_vg/vdo_pool_lv") ''; }.${flavour}; Loading Loading @@ -79,7 +79,7 @@ in import ../make-test-python.nix ({ pkgs, ... }: { kernelPackages = lib.mkIf (kernelPackages != null) kernelPackages; }; specialisation.boot-lvm.configuration.virtualisation.bootDevice = "/dev/test_vg/test_lv"; specialisation.boot-lvm.configuration.virtualisation.rootDevice = "/dev/test_vg/test_lv"; }; testScript = '' Loading Loading
nixos/tests/hibernate.nix +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ in makeTest { # Small root disk for installer 512 ]; virtualisation.bootDevice = "/dev/vdb"; virtualisation.rootDevice = "/dev/vdb"; }; }; Loading
nixos/tests/initrd-luks-empty-passphrase.nix +5 −5 Original line number Diff line number Diff line Loading @@ -30,26 +30,26 @@ in { specialisation.boot-luks-wrong-keyfile.configuration = { boot.initrd.luks.devices = lib.mkVMOverride { cryptroot = { device = "/dev/vdc"; device = "/dev/vdb"; keyFile = "/etc/cryptroot.key"; tryEmptyPassphrase = true; fallbackToPassword = !systemdStage1; }; }; virtualisation.bootDevice = "/dev/mapper/cryptroot"; virtualisation.rootDevice = "/dev/mapper/cryptroot"; boot.initrd.secrets."/etc/cryptroot.key" = keyfile; }; specialisation.boot-luks-missing-keyfile.configuration = { boot.initrd.luks.devices = lib.mkVMOverride { cryptroot = { device = "/dev/vdc"; device = "/dev/vdb"; keyFile = "/etc/cryptroot.key"; tryEmptyPassphrase = true; fallbackToPassword = !systemdStage1; }; }; virtualisation.bootDevice = "/dev/mapper/cryptroot"; virtualisation.rootDevice = "/dev/mapper/cryptroot"; }; }; Loading @@ -76,7 +76,7 @@ in { # Create encrypted volume machine.wait_for_unit("multi-user.target") machine.succeed("echo "" | cryptsetup luksFormat /dev/vdc --batch-mode") machine.succeed("echo "" | cryptsetup luksFormat /dev/vdb --batch-mode") machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks-wrong-keyfile.conf") machine.succeed("sync") machine.crash() Loading
nixos/tests/installer.nix +2 −1 Original line number Diff line number Diff line Loading @@ -316,8 +316,9 @@ let # installer. This ensures the target disk (/dev/vda) is # the same during and after installation. virtualisation.emptyDiskImages = [ 512 ]; virtualisation.bootDevice = virtualisation.rootDevice = if grubVersion == 1 then "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive2" else "/dev/vdb"; virtualisation.bootLoaderDevice = "/dev/vda"; virtualisation.qemu.diskInterface = if grubVersion == 1 then "scsi" else "virtio"; Loading
nixos/tests/luks.nix +4 −4 Original line number Diff line number Diff line Loading @@ -18,10 +18,10 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { boot-luks.configuration = { boot.initrd.luks.devices = lib.mkVMOverride { # We have two disks and only type one password - key reuse is in place cryptroot.device = "/dev/vdc"; cryptroot2.device = "/dev/vdd"; cryptroot.device = "/dev/vdb"; cryptroot2.device = "/dev/vdc"; }; virtualisation.bootDevice = "/dev/mapper/cryptroot"; virtualisation.rootDevice = "/dev/mapper/cryptroot"; }; boot-luks-custom-keymap.configuration = lib.mkMerge [ boot-luks.configuration Loading @@ -37,8 +37,8 @@ import ./make-test-python.nix ({ lib, pkgs, ... }: { testScript = '' # Create encrypted volume machine.wait_for_unit("multi-user.target") machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdb -") machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdc -") machine.succeed("echo -n supersecret | cryptsetup luksFormat -q --iter-time=1 /dev/vdd -") # Boot from the encrypted disk machine.succeed("bootctl set-default nixos-generation-1-specialisation-boot-luks.conf") Loading
nixos/tests/lvm2/systemd-stage-1.nix +4 −4 Original line number Diff line number Diff line { kernelPackages ? null, flavour }: let preparationCode = { raid = '' machine.succeed("vgcreate test_vg /dev/vdc /dev/vdd") machine.succeed("vgcreate test_vg /dev/vdb /dev/vdc") machine.succeed("lvcreate -L 512M --type raid0 test_vg -n test_lv") ''; thinpool = '' machine.succeed("vgcreate test_vg /dev/vdc") machine.succeed("vgcreate test_vg /dev/vdb") machine.succeed("lvcreate -L 512M -T test_vg/test_thin_pool") machine.succeed("lvcreate -n test_lv -V 16G --thinpool test_thin_pool test_vg") ''; vdo = '' machine.succeed("vgcreate test_vg /dev/vdc") machine.succeed("vgcreate test_vg /dev/vdb") machine.succeed("lvcreate --type vdo -n test_lv -L 6G -V 12G test_vg/vdo_pool_lv") ''; }.${flavour}; Loading Loading @@ -79,7 +79,7 @@ in import ../make-test-python.nix ({ pkgs, ... }: { kernelPackages = lib.mkIf (kernelPackages != null) kernelPackages; }; specialisation.boot-lvm.configuration.virtualisation.bootDevice = "/dev/test_vg/test_lv"; specialisation.boot-lvm.configuration.virtualisation.rootDevice = "/dev/test_vg/test_lv"; }; testScript = '' Loading