nixos/wrappers: add enable switch (#350233)

This commit is contained in:
Aleksana 2024-10-27 18:34:01 +08:00 committed by GitHub
commit a56b4f3e50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -165,6 +165,10 @@ in
###### interface
options = {
security.enableWrappers = lib.mkEnableOption "SUID/SGID wrappers" // {
default = true;
};
security.wrappers = lib.mkOption {
type = lib.types.attrsOf wrapperType;
default = {};
@ -227,7 +231,7 @@ in
};
###### implementation
config = {
config = lib.mkIf config.security.enableWrappers {
assertions = lib.mapAttrsToList
(name: opts: