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

View File

@ -48,6 +48,10 @@ in {
nix.extraOptions = "experimental-features = nix-command flakes";
environment.etc.nixos.source = ./..;
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 {