mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-05 08:17:01 +00:00
Merge pull request #888 from Samasaur1/fix-sudo-extraconfig
security.sudo.extraConfig: fix default behavior
This commit is contained in:
commit
6c06334f08
1 changed files with 7 additions and 3 deletions
|
@ -12,8 +12,8 @@ in
|
|||
|
||||
options = {
|
||||
security.sudo.extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
description = mdDoc ''
|
||||
Extra configuration text appended to {file}`sudoers`.
|
||||
'';
|
||||
|
@ -21,6 +21,10 @@ in
|
|||
};
|
||||
|
||||
config = {
|
||||
environment.etc."sudoers.d/10-nix-darwin-extra-config".text = lib.mkIf (cfg.extraConfig != "") cfg.extraConfig;
|
||||
environment.etc = {
|
||||
"sudoers.d/10-nix-darwin-extra-config" = mkIf (cfg.extraConfig != null) {
|
||||
text = cfg.extraConfig;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue