diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 1eed27e00a54..894ed9020894 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -769,7 +769,10 @@ in }; influxdb = runTest ./influxdb.nix; influxdb2 = runTest ./influxdb2.nix; - initrd-luks-empty-passphrase = runTest ./initrd-luks-empty-passphrase.nix; + initrd-luks-empty-passphrase = runTest { + imports = [ ./initrd-luks-empty-passphrase.nix ]; + _module.args.systemdStage1 = false; + }; initrd-network-openvpn = handleTestOn [ "x86_64-linux" "i686-linux" ] ./initrd-network-openvpn { }; initrd-network-ssh = handleTest ./initrd-network-ssh { }; initrd-secrets = handleTest ./initrd-secrets.nix { }; diff --git a/nixos/tests/initrd-luks-empty-passphrase.nix b/nixos/tests/initrd-luks-empty-passphrase.nix index 3a906685f0ca..56a92a827ff4 100644 --- a/nixos/tests/initrd-luks-empty-passphrase.nix +++ b/nixos/tests/initrd-luks-empty-passphrase.nix @@ -14,8 +14,6 @@ in { name = "initrd-luks-empty-passphrase"; - _module.args.systemdStage1 = lib.mkDefault false; - nodes.machine = { pkgs, ... }: { @@ -31,9 +29,9 @@ in }; boot.loader.systemd-boot.enable = true; - boot.initrd.systemd = lib.mkIf systemdStage1 { - enable = true; - emergencyAccess = true; + boot.initrd.systemd = { + enable = systemdStage1; + emergencyAccess = lib.mkIf systemdStage1 true; }; environment.systemPackages = with pkgs; [ cryptsetup ];