about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorNicola Squartini <tensor5@gmail.com>2023-04-30 12:07:45 +0200
committerNicola Squartini <tensor5@gmail.com>2023-05-15 09:22:42 +0200
commit87cbaf7ce339136ccbd639b7b5a1cf988d0fa440 (patch)
treeb70dd8bab2a0df3272a953908fe45670a8250d1f /nixos
parent5466f767556b12a6db4bcaa6e9ab9970d28b0d29 (diff)
nixos/pam: assert ZFS support for PAM module
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/security/pam.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix
index 55137df7afe4d..41994aa524229 100644
--- a/nixos/modules/security/pam.nix
+++ b/nixos/modules/security/pam.nix
@@ -1286,6 +1286,12 @@ in
           Only one of users.motd and users.motdFile can be set.
         '';
       }
+      {
+        assertion = config.security.pam.zfs.enable && (config.boot.zfs.enabled || config.boot.zfs.enableUnstable);
+        message = ''
+          `security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled` or `boot.zfs.enableUnstable`).
+        '';
+      }
     ];
 
     environment.systemPackages =