dotfiles/modules/system/doas.nix

29 lines
493 B
Nix
Raw Normal View History

2022-04-26 01:54:53 +00:00
# Replace sudo with doas
{ config, ... }: {
config = {
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;
}];
};
};
};
}