mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-14 03:42:56 +00:00
31 lines
537 B
Nix
31 lines
537 B
Nix
# Replace sudo with doas
|
|
|
|
{ identity, ... }: {
|
|
|
|
security = {
|
|
|
|
# Remove sudo
|
|
sudo.enable = false;
|
|
|
|
# Add doas
|
|
doas = {
|
|
enable = true;
|
|
|
|
# No password required
|
|
wheelNeedsPassword = false;
|
|
|
|
# Pass environment variables from user to root
|
|
# Also requires removing password here
|
|
extraRules = [{
|
|
groups = [ "wheel" ];
|
|
noPass = true;
|
|
keepEnv = true;
|
|
}];
|
|
};
|
|
};
|
|
|
|
home-manager.users.${identity.user}.programs.fish.shellAliases = {
|
|
sudo = "doas";
|
|
};
|
|
}
|