mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
nixos/sudo-rs: align sudo and sudo-rs config
Since the latest release, sudo-rs supports all what we need
This commit is contained in:
parent
f19139966a
commit
4e17c9546f
2 changed files with 13 additions and 7 deletions
|
@ -76,12 +76,18 @@
|
|||
export TERM=$TERM
|
||||
'';
|
||||
|
||||
security.sudo.extraConfig = lib.mkIf config.security.sudo.keepTerminfo ''
|
||||
|
||||
# Keep terminfo database for root and %wheel.
|
||||
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
||||
Defaults:root,%wheel env_keep+=TERMINFO
|
||||
'';
|
||||
security =
|
||||
let
|
||||
extraConfig = ''
|
||||
|
||||
# Keep terminfo database for root and %wheel.
|
||||
Defaults:root,%wheel env_keep+=TERMINFO_DIRS
|
||||
Defaults:root,%wheel env_keep+=TERMINFO
|
||||
'';
|
||||
in
|
||||
lib.mkIf config.security.sudo.keepTerminfo {
|
||||
sudo = { inherit extraConfig; };
|
||||
sudo-rs = { inherit extraConfig; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ in
|
|||
|
||||
defaultOptions = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [ ];
|
||||
default = [ "SETENV" ];
|
||||
description = ''
|
||||
Options used for the default rules, granting `root` and the
|
||||
`wheel` group permission to run any command as any user.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue