Clarify bcachefs auto-unlock comments and note root snapshot reset

This commit is contained in:
RingOfStorms (Joshua Bell) 2026-01-14 16:56:40 -06:00
parent e16ba27ad6
commit e8c7befd88

View file

@ -108,6 +108,7 @@ lib.mkMerge [
serviceConfig.KeyringMode = "shared"; serviceConfig.KeyringMode = "shared";
}; };
# Resets my root to a fresh snapshot. I do this my simply moving root to an old snapshots directory
boot.initrd.systemd.services.bcachefs-reset-root = { boot.initrd.systemd.services.bcachefs-reset-root = {
description = "Reset bcachefs root subvolume before pivot"; description = "Reset bcachefs root subvolume before pivot";
@ -171,14 +172,8 @@ lib.mkMerge [
''; '';
}; };
}) })
# If you mess up decruption password this reboots for retry instead of getting stuck # Bcachefs auto decryption / unlock (will use usb key if provided above, else just prompts password)
(lib.mkIf ENCRYPTED { # We use this for password instead of the default one because default doesn't let you retry if you misstype the password
boot.kernelParams = [
"rd.shell=0"
"rd.emergency=reboot"
];
})
# Bcachefs auto decryption / unlock
(lib.mkIf ENCRYPTED { (lib.mkIf ENCRYPTED {
boot.supportedFilesystems = [ boot.supportedFilesystems = [
"bcachefs" "bcachefs"