mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 19:51:34 +01:00
Complete overhaul
This commit is contained in:
commit
d30d11566d
38 changed files with 1373 additions and 0 deletions
25
modules/system/doas.nix
Normal file
25
modules/system/doas.nix
Normal 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";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue