mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
nixos/tests/installer/bcachefs: use ocr to type in password
This commit is contained in:
parent
13b0e42202
commit
c8104628f4
1 changed files with 8 additions and 3 deletions
|
@ -749,10 +749,15 @@ in {
|
||||||
environment.systemPackages = with pkgs; [ keyutils ];
|
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 = ''
|
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 = ''
|
createPartitions = ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue