Complete overhaul

This commit is contained in:
SebastianStork 2024-03-12 21:10:35 +01:00
commit d30d11566d
38 changed files with 1373 additions and 0 deletions

25
modules/system/doas.nix Normal file
View file

@ -0,0 +1,25 @@
{
config,
lib,
...
}: {
options.myConfig.doas.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.doas.enable {
security.sudo.enable = false;
security.doas = {
enable = true;
extraRules = [
{
groups = ["wheel"];
keepEnv = true;
persist = true;
}
];
};
environment.shellAliases.sudo = "doas";
programs.bash.interactiveShellInit = lib.mkIf config.myConfig.shell.bash.enable "complete -F _command doas";
};
}