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
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue