From b39cda6b84ec0f28a670156e62f0946ab2dc027d Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 4 Mar 2024 13:01:07 +0000 Subject: [PATCH] fix: zfs noauto encrypted pool still requesting passphrase on reboot --- hosts/swan/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/hosts/swan/default.nix b/hosts/swan/default.nix index 4d7f096..fb14d22 100644 --- a/hosts/swan/default.nix +++ b/hosts/swan/default.nix @@ -56,8 +56,15 @@ inputs.nixpkgs.lib.nixosSystem { devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; }); }; - # Automatically load the ZFS pool on boot - boot.zfs.extraPools = [ "tank" ]; + boot.zfs = { + # Automatically load the ZFS pool on boot + extraPools = [ "tank" ]; + # Only try to decrypt datasets with keyfiles + requestEncryptionCredentials = + [ "tank/archive" "tank/generic" "tank/nextcloud" ]; + # If password is requested and fails, continue to boot eventually + passwordTimeout = 300; + }; # Theming