From 2787b874601d88e5b44754b7a6607f7e44cb60e7 Mon Sep 17 00:00:00 2001 From: r-vdp Date: Sun, 7 Jun 2026 14:44:10 +0300 Subject: [PATCH] nixosTests.systemd-initrd-luks-fido2: don't rely on autoFormat b5611f96b6e1 dropped the patch that originally made this work, fix the test in the same way as what was done in b13891782fde. --- nixos/tests/systemd-initrd-luks-fido2.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/tests/systemd-initrd-luks-fido2.nix b/nixos/tests/systemd-initrd-luks-fido2.nix index 783b9d7426e7..3c191dcbf509 100644 --- a/nixos/tests/systemd-initrd-luks-fido2.nix +++ b/nixos/tests/systemd-initrd-luks-fido2.nix @@ -38,7 +38,6 @@ }; }; virtualisation.rootDevice = "/dev/mapper/cryptroot"; - virtualisation.fileSystems."/".autoFormat = true; }; }; @@ -52,6 +51,8 @@ # 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 luksOpen -q /dev/vdb cryptroot") + machine.succeed("mkfs.ext4 /dev/mapper/cryptroot") machine.succeed("PASSWORD=supersecret SYSTEMD_LOG_LEVEL=debug systemd-cryptenroll --fido2-device=auto /dev/vdb |& systemd-cat") # Boot from the encrypted disk