justfile | formating, and added oldschool to call nixos-rebuild directly
This commit is contained in:
parent
77c458ff10
commit
61bab0ffe7
1 changed files with 14 additions and 9 deletions
23
justfile
23
justfile
|
|
@ -2,7 +2,7 @@ HOSTNAME := `hostname -s`
|
||||||
|
|
||||||
# Do as test build without installing
|
# Do as test build without installing
|
||||||
test hostname=(HOSTNAME):
|
test hostname=(HOSTNAME):
|
||||||
@nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false)
|
@nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false )
|
||||||
@rm -f nixos-switch.log
|
@rm -f nixos-switch.log
|
||||||
@colmena --impure build --on {{hostname}}
|
@colmena --impure build --on {{hostname}}
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ web:
|
||||||
# Build and run a vm FIXME
|
# Build and run a vm FIXME
|
||||||
vm hostname=(HOSTNAME):
|
vm hostname=(HOSTNAME):
|
||||||
@doas rm -f result
|
@doas rm -f result
|
||||||
@nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false)
|
@nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false )
|
||||||
@rm -f nixos-switch.log
|
@rm -f nixos-switch.log
|
||||||
@echo Running iso build
|
@echo Running iso build
|
||||||
@nixos-rebuild build-vm --flake .#{{hostname}}
|
@nixos-rebuild build-vm --flake .#{{hostname}}
|
||||||
|
|
@ -42,10 +42,10 @@ vm hostname=(HOSTNAME):
|
||||||
result/bin/run-{{hostname}}-vm
|
result/bin/run-{{hostname}}-vm
|
||||||
|
|
||||||
bootiso:
|
bootiso:
|
||||||
@nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false)
|
@nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false )
|
||||||
@rm -f nixos-switch.log result
|
@rm -f nixos-switch.log result
|
||||||
@echo Running iso build
|
@echo Running iso build
|
||||||
@doas nix build --impure ./#nixosConfigurations.vm.config.system.build.isoImage &> nixos-switch.log || ( grep -E --color '(error|For full logs)' nixos-switch.log && false)
|
@doas nix build --impure ./#nixosConfigurations.vm.config.system.build.isoImage &> nixos-switch.log || ( grep -E --color '(error|For full logs)' nixos-switch.log && false )
|
||||||
|
|
||||||
# Stuff to do weekly
|
# Stuff to do weekly
|
||||||
weekly: pull clean update world ci push clean-world
|
weekly: pull clean update world ci push clean-world
|
||||||
|
|
@ -53,7 +53,7 @@ weekly: pull clean update world ci push clean-world
|
||||||
# Update flake.lock
|
# Update flake.lock
|
||||||
update:
|
update:
|
||||||
@echo "Updating flake.lock"
|
@echo "Updating flake.lock"
|
||||||
@nix flake update &> nixos-switch.log || ( cat nixos-switch.log && false)
|
@nix flake update &> nixos-switch.log || ( cat nixos-switch.log && false )
|
||||||
@rm -f nixos-switch.log
|
@rm -f nixos-switch.log
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
|
|
@ -82,19 +82,24 @@ push:
|
||||||
# Pull changes from git
|
# Pull changes from git
|
||||||
pull:
|
pull:
|
||||||
@echo Updating from git repo
|
@echo Updating from git repo
|
||||||
@git pull &> nixos-switch.log || ( cat nixos-switch.log && false)
|
@git pull &> nixos-switch.log || ( cat nixos-switch.log && false )
|
||||||
@rm -f nixos-switch.log
|
@rm -f nixos-switch.log
|
||||||
@doas nix-prefetch-url file://`pwd`/`ls -1 src/linuxx64* | tail -n1` &> nixos-switch.log || ( cat nixos-switch.log && false)
|
@doas nix-prefetch-url file://`pwd`/`ls -1 src/linuxx64* | tail -n1` &> nixos-switch.log || ( cat nixos-switch.log && false )
|
||||||
@rm -f nixos-switch.log
|
@rm -f nixos-switch.log
|
||||||
# @doas nix-prefetch-url file://`pwd`/`ls -1 src/linuxarm64* | tail -n1` &> nixos-switch.log || ( cat nixos-switch.log && false)
|
# @doas nix-prefetch-url file://`pwd`/`ls -1 src/linuxarm64* | tail -n1` &> nixos-switch.log || ( cat nixos-switch.log && false )
|
||||||
# @rm -f nixos-switch.log
|
# @rm -f nixos-switch.log
|
||||||
|
|
||||||
# Add everything to git
|
# Add everything to git
|
||||||
ci:
|
ci:
|
||||||
@echo "git commit"
|
@echo "git commit"
|
||||||
@git commit -m"chore | Update flake.lock" flake.lock &> nixos-switch.log || ( cat nixos-switch.log && false)
|
@git commit -m"chore | Update flake.lock" flake.lock &> nixos-switch.log || ( cat nixos-switch.log && false )
|
||||||
@rm -f nixos-switch.log
|
@rm -f nixos-switch.log
|
||||||
|
|
||||||
|
# Go old school
|
||||||
|
oldschool:
|
||||||
|
@nixfmt . &> nixos-switch.log || ( cat nixos-switch.log && false )
|
||||||
|
@rm -f nixos-switch.log
|
||||||
|
@doas nixos-rebuild switch --flake .#{{HOSTNAME}}
|
||||||
|
|
||||||
# Reboot this host
|
# Reboot this host
|
||||||
reboot:
|
reboot:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue