diff --git a/bin/rebuild b/bin/rebuild index c602697..8c397a6 100755 --- a/bin/rebuild +++ b/bin/rebuild @@ -26,7 +26,8 @@ echo "files:" git status --short read -rp "commit message: " commit_msg echo "rebuilding nixos with flake.nix..." -if ! sudo nixos-rebuild switch --flake .#"$hostname" 2>&1 | tee "$logfile"; then +#if ! sudo nixos-rebuild switch --flake .#"$hostname" 2>&1 | tee "$logfile"; then +if ! nh os switch 2>&1 | tee "$logfile"; then echo "rebuild failed; exited with no commit" exit 1 fi diff --git a/hosts/nixos/default.nix b/hosts/nixos/default.nix index 4f37d3f..a361824 100644 --- a/hosts/nixos/default.nix +++ b/hosts/nixos/default.nix @@ -91,6 +91,10 @@ command = "/run/current-system/sw/bin/tailscale"; options = ["NOPASSWD"]; } + { + command = "/etc/profiles/per-user/blake/bin/nh"; + options = ["NOPASSWD"]; + } ]; } ]; diff --git a/users/blake/dots/core/nh/default.nix b/users/blake/dots/core/nh/default.nix index 75c9970..da16ecc 100644 --- a/users/blake/dots/core/nh/default.nix +++ b/users/blake/dots/core/nh/default.nix @@ -15,7 +15,10 @@ in { config = lib.mkIf cfg.enable { programs.${program} = { enable = true; - flake = "${home_dir}/.nix/flake.nix"; + flake = "${home_dir}/.nix"; }; + + # add deps to userspace cause they are cool + home.packages = with pkgs; [nix-output-monitor nvd]; }; }