there shall be no impurity
This commit is contained in:
parent
e2bf8e9496
commit
0f05c5da6c
1 changed files with 11 additions and 5 deletions
16
shell.nix
16
shell.nix
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue