From 0f05c5da6c805bc894f60b976f65407d02ed935a Mon Sep 17 00:00:00 2001 From: Squibid Date: Mon, 1 Dec 2025 20:52:09 -0500 Subject: [PATCH] there shall be no impurity --- shell.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/shell.nix b/shell.nix index 7e78f75..bcfd501 100644 --- a/shell.nix +++ b/shell.nix @@ -19,6 +19,14 @@ pkgs.mkShell { ssh-to-age nixos-anywhere + (pkgs.writeShellScriptBin "-commit" '' + # there shall be no impurity + if [ -n "$(git diff)" ]; then + git add . + git commit -m "auto commit on build" -m "`PAGER=cat git diff --name-only --cached`" + fi + '') + (pkgs.writeShellScriptBin "-sops" "sops updatekeys secrets.yaml") (pkgs.writeShellScriptBin "-init" '' @@ -50,6 +58,8 @@ pkgs.mkShell { # update the keys sops updatekeys secrets.yaml + -commit + # push the flake to the remote system nixos-anywhere --\ --flake .#$HOST\ @@ -60,11 +70,7 @@ pkgs.mkShell { '') (pkgs.writeShellScriptBin "-deploy" '' - # there shall be no impurity - if [ -n "$(git diff)" ]; then - git add . - git commit -m "auto commit on build" -m "`PAGER=cat git diff --name-only --cached`" - fi + -commit # push flake config to a remote server(s) nix run github:serokell/deploy-rs . # this needs to be the same version that the flake is using