mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 11:05:14 +00:00
nixos/wrappers: add enable switch
Add enable switch to make it possible to disable all wrappers but then also re-enable all at once by forcing the option to be true. By default the wrappers are enabled and thus the default behaviour doesn't change.
This commit is contained in:
parent
120baf417b
commit
7fad2c2e39
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user