1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-05 16:27:03 +00:00
nix-darwin/modules/security/sudo.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

31 lines
543 B
Nix
Raw Normal View History

2024-02-11 14:08:59 -08:00
{ 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;
2024-04-14 23:02:32 +02:00
description = ''
2024-02-11 14:08:59 -08:00
Extra configuration text appended to {file}`sudoers`.
'';
};
};
config = {
environment.etc = {
"sudoers.d/10-nix-darwin-extra-config" = mkIf (cfg.extraConfig != null) {
text = cfg.extraConfig;
};
};
2024-02-11 14:08:59 -08:00
};
}