no password for sudo if admin

This commit is contained in:
John Lancaster
2026-03-12 12:49:02 -05:00
parent 9a22aba03a
commit 3bbe6d359e

View File

@@ -15,6 +15,19 @@
"wheel" "wheel"
]; ];
}; };
# Removes password for sudo
security.sudo-rs = lib.mkIf isAdmin {
enable = true;
extraRules = [{
users = [ "john" ];
commands = [{
command = "ALL";
options = [ "NOPASSWD" ];
}];
}];
};
# https://github.com/Doc-Steve/dendritic-design-with-flake-parts/wiki/Dendritic_Aspects#multi-context-aspect # https://github.com/Doc-Steve/dendritic-design-with-flake-parts/wiki/Dendritic_Aspects#multi-context-aspect
home-manager.users."${username}" = { home-manager.users."${username}" = {
home.username = "${username}"; home.username = "${username}";