allow upgrades without password

This commit is contained in:
Sean Buckley 2021-01-19 01:32:44 -05:00
parent ec43f7557b
commit 8522cffb8e

View file

@ -44,6 +44,17 @@
];
};
security.sudo.extraRules = [{
groups = [ "wheel" ];
commands = [
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nix-channel --update"; }
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nixos-rebuild switch"; }
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nixos-rebuild switch --upgrade"; }
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nixos-rebuild boot"; }
{ options = [ "NOPASSWD" ]; command = "/run/current-system/sw/bin/nixos-rebuild boot --upgrade"; }
];
}];
users.users.sean = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" "video" "networkmanager" "dialout" "input" "wireshark" ];