about summary refs log tree commit diff
path: root/nixos/modules/tasks/filesystems
diff options
context:
space:
mode:
authorWill Fancher <elvishjerricco@gmail.com>2024-01-15 11:31:25 -0500
committerGitHub <noreply@github.com>2024-01-15 11:31:25 -0500
commitc6f2b53e780aacdbc5ef5c95d226b0c51900de83 (patch)
treef6a6d0fcf64cba9b8b0399de0304ef680e46b821 /nixos/modules/tasks/filesystems
parente3528ac5517c68ef67bce66b9dce5433a402ceda (diff)
parent51dfaf639a9365f327e1ffd153a237178999fb82 (diff)
Merge pull request #280296 from ancathri/getKeyLocations-nosnapshots
nixos/zfs: fix getKeyLocations when listsnaps=on 
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r--nixos/modules/tasks/filesystems/zfs.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix
index bc8b8fdf8144f..b289d2151eb79 100644
--- a/nixos/modules/tasks/filesystems/zfs.nix
+++ b/nixos/modules/tasks/filesystems/zfs.nix
@@ -108,12 +108,12 @@ let
 
   getKeyLocations = pool: if isBool cfgZfs.requestEncryptionCredentials then {
     hasKeys = cfgZfs.requestEncryptionCredentials;
-    command = "${cfgZfs.package}/sbin/zfs list -rHo name,keylocation,keystatus ${pool}";
+    command = "${cfgZfs.package}/sbin/zfs list -rHo name,keylocation,keystatus -t volume,filesystem ${pool}";
   } else let
     keys = filter (x: datasetToPool x == pool) cfgZfs.requestEncryptionCredentials;
   in {
     hasKeys = keys != [];
-    command = "${cfgZfs.package}/sbin/zfs list -Ho name,keylocation,keystatus ${toString keys}";
+    command = "${cfgZfs.package}/sbin/zfs list -Ho name,keylocation,keystatus -t volume,filesystem ${toString keys}";
   };
 
   createImportService = { pool, systemd, force, prefix ? "" }: