Skip to content

Commit 7fad2c2

Browse files
committed
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.
1 parent 120baf4 commit 7fad2c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nixos/modules/security/wrappers/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ in
165165
###### interface
166166

167167
options = {
168+
security.enableWrappers = lib.mkEnableOption "SUID/SGID wrappers" // {
169+
default = true;
170+
};
171+
168172
security.wrappers = lib.mkOption {
169173
type = lib.types.attrsOf wrapperType;
170174
default = {};
@@ -227,7 +231,7 @@ in
227231
};
228232

229233
###### implementation
230-
config = {
234+
config = lib.mkIf config.security.enableWrappers {
231235

232236
assertions = lib.mapAttrsToList
233237
(name: opts:

0 commit comments

Comments
 (0)