From 914bf5836974520e6cfd3e687dead3937f6d3db2 Mon Sep 17 00:00:00 2001 From: nicoo Date: Thu, 7 Sep 2023 14:55:33 +0000 Subject: nixos/{sudo, terminfo}: Adjust defaults for compatibility with `sudo-rs` --- nixos/modules/security/sudo.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'nixos/modules/security') 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 ? [] }: [ { -- cgit 1.4.1