there shall be no impurity

This commit is contained in:
Squibid 2025-12-01 20:52:09 -05:00
parent e2bf8e9496
commit 0f05c5da6c
Signed by: squibid
GPG key ID: BECE5684D3C4005D

View file

@ -19,6 +19,14 @@ pkgs.mkShell {
ssh-to-age ssh-to-age
nixos-anywhere 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 "-sops" "sops updatekeys secrets.yaml")
(pkgs.writeShellScriptBin "-init" '' (pkgs.writeShellScriptBin "-init" ''
@ -50,6 +58,8 @@ pkgs.mkShell {
# update the keys # update the keys
sops updatekeys secrets.yaml sops updatekeys secrets.yaml
-commit
# push the flake to the remote system # push the flake to the remote system
nixos-anywhere --\ nixos-anywhere --\
--flake .#$HOST\ --flake .#$HOST\
@ -60,11 +70,7 @@ pkgs.mkShell {
'') '')
(pkgs.writeShellScriptBin "-deploy" '' (pkgs.writeShellScriptBin "-deploy" ''
# there shall be no impurity -commit
if [ -n "$(git diff)" ]; then
git add .
git commit -m "auto commit on build" -m "`PAGER=cat git diff --name-only --cached`"
fi
# push flake config to a remote server(s) # 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 nix run github:serokell/deploy-rs . # this needs to be the same version that the flake is using