mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
Merge pull request #866 from Samasaur1/master
security.sudo.extraConfig: init
This commit is contained in:
commit
44f50a5eca
2 changed files with 27 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
./security/pam.nix
|
||||
./security/pki
|
||||
./security/sandbox
|
||||
./security/sudo.nix
|
||||
./system
|
||||
./system/base.nix
|
||||
./system/checks.nix
|
||||
|
|
26
modules/security/sudo.nix
Normal file
26
modules/security/sudo.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.security.sudo;
|
||||
in
|
||||
{
|
||||
meta.maintainers = [
|
||||
lib.maintainers.samasaur or "samasaur"
|
||||
];
|
||||
|
||||
options = {
|
||||
security.sudo.extraConfig = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = mdDoc ''
|
||||
Extra configuration text appended to {file}`sudoers`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.etc."sudoers.d/10-nix-darwin-extra-config".text = lib.mkIf (cfg.extraConfig != "") cfg.extraConfig;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue