From 134aaffb30c0e2d352e74c3585f88ec567714ad9 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Thu, 5 Mar 2026 18:02:41 -0800 Subject: make push hook actually work by abstracting user --- .pre-commit-config.yaml | 2 +- flake.nix | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c5fc309..a38d569 120000 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1 +1 @@ -/nix/store/7glw6wk3bwhgxx9plk35jigcwziawpjn-pre-commit-config.json \ No newline at end of file +/nix/store/6fvxyam5cy48j363m8r1xf8jddkrsg5s-pre-commit-config.json \ No newline at end of file diff --git a/flake.nix b/flake.nix index dcd9843..de232f7 100644 --- a/flake.nix +++ b/flake.nix @@ -23,18 +23,20 @@ emacsPackages = import "${nixmacs}/modules/home/emacs-packages.nix"; ci-emacs = pkgs.emacs-nox.pkgs.withPackages emacsPackages; + specialArgs = { monorepoSelf = self; }; installer = nixmacs.nixosConfigurations.installer.extendModules { - specialArgs = { monorepoSelf = self; }; + inherit specialArgs; }; - installer-iso = installer.config.system.build.isoImage; - spontaneity = nixmacs.nixosConfigurations.spontaneity.extendModules { - specialArgs = { monorepoSelf = self; }; + inherit specialArgs; }; + installer-iso = installer.config.system.build.isoImage; + spontaneityHost = spontaneity.config.monorepo.vars.orgHost; + spontaneityUser = spontaneity.config.monorepo.vars.userName; pre-commit-check = git-hooks.lib.${system}.run { src = ./.; @@ -96,7 +98,7 @@ if [ "$BRANCH" != "main" ]; then exit 0 fi echo "Pushing to main detected. Deploying to ${spontaneityHost}..." -nixos-rebuild switch --flake .#spontaneity --target-host root@${spontaneityHost} --build-host localhost +nixos-rebuild switch --flake .#spontaneity --target-host ${spontaneityUser}@${spontaneityHost} if [ $? -eq 0 ]; then echo "Deployment successful!" else -- cgit v1.3