diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2023-01-01 19:53:11 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2023-01-01 19:58:17 +0100 |
commit | c8104628f4057f2b1842f6e31eaff2fe1d0eeda7 (patch) | |
tree | 46ba769787f1ac33ae97483bd22bf24de123f03c /nixos/tests/installer.nix | |
parent | 13b0e42202fa3919d551e2e130098c2b14e4b745 (diff) | |
download | nixpkgs-c8104628f4057f2b1842f6e31eaff2fe1d0eeda7.tar nixpkgs-c8104628f4057f2b1842f6e31eaff2fe1d0eeda7.tar.gz nixpkgs-c8104628f4057f2b1842f6e31eaff2fe1d0eeda7.tar.bz2 nixpkgs-c8104628f4057f2b1842f6e31eaff2fe1d0eeda7.tar.lz nixpkgs-c8104628f4057f2b1842f6e31eaff2fe1d0eeda7.tar.xz nixpkgs-c8104628f4057f2b1842f6e31eaff2fe1d0eeda7.tar.zst nixpkgs-c8104628f4057f2b1842f6e31eaff2fe1d0eeda7.zip |
nixos/tests/installer/bcachefs: use ocr to type in password
Diffstat (limited to 'nixos/tests/installer.nix')
-rw-r--r-- | nixos/tests/installer.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 223aac49139..5f3f61632f0 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -749,10 +749,15 @@ in { environment.systemPackages = with pkgs; [ keyutils ]; }; - # We don't want to use the normal way of unlocking bcachefs defined in tasks/filesystems/bcachefs.nix. - # So, override initrd.postDeviceCommands completely and simply unlock with the predefined password. extraConfig = '' - boot.initrd.postDeviceCommands = lib.mkForce "echo password | bcachefs unlock /dev/vda3"; + boot.kernelParams = lib.mkAfter [ "console=tty0" ]; + ''; + + enableOCR = true; + preBootCommands = '' + machine.start() + machine.wait_for_text("enter passphrase for ") + machine.send_chars("password\n") ''; createPartitions = '' |