Merge pull request #87579 from cole-h/sudo
nixos/sudo: default rule should be first
commitd7122c3a3292d8fb672643149c8bec4f48f139f9
authorworldofpeace <worldofpeace@protonmail.ch>
dateWed 17 Jun 2020, 20:56 (6 years ago)
parent02ff18c13e2c75
nixos/modules/security/sudo.nix+3−1
@@ -173,7 +173,9 @@ in
173173
174174 config = mkIf cfg.enable {
175175
176− security.sudo.extraRules = [
176+ # We `mkOrder 600` so that the default rule shows up first, but there is
177+ # still enough room for a user to `mkBefore` it.
178+ security.sudo.extraRules = mkOrder 600 [
177179 { groups = [ "wheel" ];
178180 commands = [ { command = "ALL"; options = (if cfg.wheelNeedsPassword then [ "SETENV" ] else [ "NOPASSWD" "SETENV" ]); } ];
179181 }