1
1
Fork 0

beatific: allow `sudo nixos-rebuild` without password for tvb

This commit is contained in:
Tim Van Baak 2023-12-19 19:33:25 -08:00
parent 7afcfbac2b
commit 532e7a5c6b
1 changed files with 4 additions and 0 deletions

View File

@ -48,6 +48,10 @@ in {
nix.extraOptions = "experimental-features = nix-command flakes"; nix.extraOptions = "experimental-features = nix-command flakes";
environment.etc.nixos.source = ./..; environment.etc.nixos.source = ./..;
environment.shellAliases.nr = "sudo nixos-rebuild --flake $HOME/nixos-configs"; environment.shellAliases.nr = "sudo nixos-rebuild --flake $HOME/nixos-configs";
security.sudo.extraRules = [{
users = [ "tvb" ];
commands = [ { command = "/run/current-system/sw/bin/nixos-rebuild"; options = [ "NOPASSWD" ]; } ];
}];
} }
(mkIf cfg.defaults.time { (mkIf cfg.defaults.time {