1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-15 17:51:01 +00:00
nix-darwin/modules/security/sudo.nix
2024-04-19 04:05:50 +02:00

30 lines
543 B
Nix

{ config, lib, ... }:
with lib;
let
cfg = config.security.sudo;
in
{
meta.maintainers = [
lib.maintainers.samasaur or "samasaur"
];
options = {
security.sudo.extraConfig = mkOption {
type = types.nullOr types.lines;
default = null;
description = ''
Extra configuration text appended to {file}`sudoers`.
'';
};
};
config = {
environment.etc = {
"sudoers.d/10-nix-darwin-extra-config" = mkIf (cfg.extraConfig != null) {
text = cfg.extraConfig;
};
};
};
}