try to use keyctl

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-12-14 15:57:19 -06:00
parent f0ea807221
commit 3b74d3c5d8

View file

@ -89,7 +89,7 @@ in
# PRIMARY unencrypt # PRIMARY unencrypt
boot.initrd.systemd.enable = true; boot.initrd.systemd.enable = true;
boot.initrd.systemd.packages = [ pkgs.keyutils ]; boot.initrd.systemd.storePaths = [ pkgs.keyutils ];
boot.supportedFilesystems = [ boot.supportedFilesystems = [
"bcachefs" "bcachefs"
"vfat" "vfat"
@ -128,7 +128,7 @@ in
# but uses a key file from the USB stick instead of systemd-ask-password. # but uses a key file from the USB stick instead of systemd-ask-password.
script = '' script = ''
echo "Using test password..." echo "Using test password..."
keyctl link @u @s ${pkgs.keyutils}/bin/keyctl link @u @s
echo "test" | ${pkgs.bcachefs-tools}/bin/bcachefs unlock -k session "${PRIMARY}" echo "test" | ${pkgs.bcachefs-tools}/bin/bcachefs unlock -k session "${PRIMARY}"
echo "bcachefs unlock successful for ${PRIMARY}" echo "bcachefs unlock successful for ${PRIMARY}"
''; '';