diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 05174e03754..b4620ee1715 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -100,6 +100,7 @@ let getKeyLocations = pool: if isBool cfgZfs.requestEncryptionCredentials then "${cfgZfs.package}/sbin/zfs list -rHo name,keylocation,keystatus ${pool}" + else if (filter (x: datasetToPool x == pool) cfgZfs.requestEncryptionCredentials) == [ ] then ":" else "${cfgZfs.package}/sbin/zfs list -Ho name,keylocation,keystatus ${toString (filter (x: datasetToPool x == pool) cfgZfs.requestEncryptionCredentials)}"; createImportService = { pool, systemd, force, prefix ? "" }: