From 1ff76f80c39fd928416430852a8e9efad9983370 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Fri, 6 Mar 2026 02:04:11 -0800 Subject: merge --- flake.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index c9884eb..f97c2f7 100644 --- a/flake.nix +++ b/flake.nix @@ -92,12 +92,18 @@ fi pass_filenames = false; always_run = true; entry = "${pkgs.writeShellScript "deploy-spontaneity-hook" '' +exec < /dev/tty BRANCH=$(git branch --show-current) if [ "$BRANCH" != "main" ]; then exit 0 fi echo "Pushing to main detected. Deploying to ${spontaneityHost}..." +export NIX_SSHOPTS="-t" +nixos-rebuild switch --flake .#spontaneity \ + --target-host ${spontaneityUser}@${spontaneityHost} + --ask-sudo-password --sudo + if [ $? -eq 0 ]; then echo "Deployment successful!" else -- cgit v1.3