Added host arg in justfile
This commit is contained in:
27
justfile
27
justfile
@@ -1,35 +1,42 @@
|
|||||||
update-config:
|
hosts := "puter box"
|
||||||
|
|
||||||
|
_check-host host:
|
||||||
|
if ! echo "{{hosts}}" | grep -qw "{{host}}"; then \
|
||||||
|
echo "Unknown host:{{host}} \n Must be one of: {{hosts}}"; exit 1;\
|
||||||
|
fi
|
||||||
|
|
||||||
|
update-config: host: _check-host
|
||||||
alejandra .
|
alejandra .
|
||||||
nix flake update
|
nix flake update
|
||||||
git add .
|
git add .
|
||||||
git commit
|
git commit
|
||||||
sudo nixos-rebuild switch --upgrade --flake ~/haus#puter
|
sudo nixos-rebuild switch --upgrade --flake ~/haus#{{host}}
|
||||||
git push
|
git push
|
||||||
|
|
||||||
update:
|
update: host: _check-host
|
||||||
nix flake update
|
nix flake update
|
||||||
git add .
|
git add .
|
||||||
git commit -m "nix flake update"
|
git commit -m "nix flake update"
|
||||||
sudo nixos-rebuild switch --upgrade --flake ~/haus#puter
|
sudo nixos-rebuild switch --upgrade --flake ~/haus#{{host}}
|
||||||
git push
|
git push
|
||||||
|
|
||||||
update-and-reboot:
|
update-and-reboot: host: _check-host
|
||||||
nix flake update
|
nix flake update
|
||||||
git add .
|
git add .
|
||||||
git commit -m "nix flake update"
|
git commit -m "nix flake update"
|
||||||
sudo nixos-rebuild boot --upgrade --flake ~/haus#puter
|
sudo nixos-rebuild boot --upgrade --flake ~/haus#{{host}}
|
||||||
git push
|
git push
|
||||||
|
|
||||||
update-config-and-reboot:
|
update-config-and-reboot: host: _check-host
|
||||||
alejandra .
|
alejandra .
|
||||||
nix flake update
|
nix flake update
|
||||||
git add .
|
git add .
|
||||||
git commit
|
git commit
|
||||||
sudo nixos-rebuild boot --upgrade --flake ~/haus#puter
|
sudo nixos-rebuild boot --upgrade --flake ~/haus#{{host}}
|
||||||
git push
|
git push
|
||||||
|
|
||||||
upgrade:
|
upgrade: host: _check-host
|
||||||
sudo nixos-rebuild switch --upgrade --flake ~/haus#puter
|
sudo nixos-rebuild switch --upgrade --flake ~/haus#{{host}}
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
sudo nix-env --delete-generations old
|
sudo nix-env --delete-generations old
|
||||||
|
|||||||
Reference in New Issue
Block a user