diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix index e50038ecbec9..280ef183068b 100644 --- a/nixos/modules/security/pam.nix +++ b/nixos/modules/security/pam.nix @@ -1668,13 +1668,11 @@ in (lib.concatMap lib.attrValues) (lib.filter (rule: rule.enable)) (lib.catAttrs "modulePath") - # TODO(@uninsane): replace this warning + lib.filter with just an assertion - (map (modulePath: lib.warnIfNot + (map (modulePath: lib.throwIfNot (lib.hasPrefix "/" modulePath) - ''non-absolute PAM modulePath "${modulePath}" is unsupported by apparmor and will be treated as an error by future versions of nixpkgs; see '' + ''non-absolute PAM modulePath "${modulePath}" is unsupported by apparmor'' modulePath )) - (lib.filter (lib.hasPrefix "/")) lib.unique (map (module: "mr ${module},")) concatLines