cfg/mod/desktop/security.nix
2025-07-02 22:40:07 +02:00

28 lines
473 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.desktop.security;
inherit (lib) mkEnableOption mkIf;
in
{
options.desktop.security.enable = mkEnableOption "Security";
config = mkIf cfg.enable {
security.protectKernelImage = true;
security.sudo.enable = false;
security.doas = {
enable = true;
extraRules = [
{
groups = [ "wheel" ];
persist = true;
keepEnv = true;
}
];
};
};
}