diff options
author | nicoo <nicoo@mur.at> | 2023-09-07 14:55:33 +0000 |
---|---|---|
committer | nicoo <nicoo@mur.at> | 2023-09-18 17:36:15 +0000 |
commit | 914bf5836974520e6cfd3e687dead3937f6d3db2 (patch) | |
tree | db7a2858e2ec0788eee6203ed1d2f7070da0bf64 /nixos/modules/security | |
parent | f0107b4f63a70925050954f647d14f6e256362d8 (diff) | |
download | nixpkgs-914bf5836974520e6cfd3e687dead3937f6d3db2.tar nixpkgs-914bf5836974520e6cfd3e687dead3937f6d3db2.tar.gz nixpkgs-914bf5836974520e6cfd3e687dead3937f6d3db2.tar.bz2 nixpkgs-914bf5836974520e6cfd3e687dead3937f6d3db2.tar.lz nixpkgs-914bf5836974520e6cfd3e687dead3937f6d3db2.tar.xz nixpkgs-914bf5836974520e6cfd3e687dead3937f6d3db2.tar.zst nixpkgs-914bf5836974520e6cfd3e687dead3937f6d3db2.zip |
nixos/{sudo, terminfo}: Adjust defaults for compatibility with `sudo-rs`
Diffstat (limited to 'nixos/modules/security')
-rw-r--r-- | nixos/modules/security/sudo.nix | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/nixos/modules/security/sudo.nix b/nixos/modules/security/sudo.nix index 528c230686f..9a018b85746 100644 --- a/nixos/modules/security/sudo.nix +++ b/nixos/modules/security/sudo.nix @@ -40,7 +40,10 @@ in defaultOptions = mkOption { type = with types; listOf str; - default = [ "SETENV" ]; + default = optional usingMillersSudo "SETENV"; + defaultText = literalMD '' + `[ "SETENV" ]` if using the default `sudo` implementation + ''; description = mdDoc '' Options used for the default rules, granting `root` and the `wheel` group permission to run any command as any user. @@ -204,11 +207,6 @@ in ###### implementation config = mkIf cfg.enable { - assertions = [ - { assertion = usingMillersSudo; - message = "The NixOS `sudo` module does not yet work with other implementations."; } - ]; - security.sudo.extraRules = let defaultRule = { users ? [], groups ? [], opts ? [] }: [ { |