diff options
| author | Preston Pan <ret2pop@nullring.xyz> | 2026-03-05 18:02:41 -0800 |
|---|---|---|
| committer | Preston Pan <ret2pop@nullring.xyz> | 2026-03-05 18:02:41 -0800 |
| commit | 134aaffb30c0e2d352e74c3585f88ec567714ad9 (patch) | |
| tree | f8432cfec527975ca1e04ce81e3cab27d7cbab39 | |
| parent | 471fcf956dc8da511bc9f6563157e70e35dad740 (diff) | |
make push hook actually work by abstracting user
| l--------- | .pre-commit-config.yaml | 2 | ||||
| -rw-r--r-- | 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 @@ -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 |
