From 61bab0ffe7ab35240af0d9791b4cb3cdfd7961ca Mon Sep 17 00:00:00 2001 From: Don Harper Date: Thu, 2 Jan 2025 23:02:07 -0600 Subject: [PATCH] justfile | formating, and added oldschool to call nixos-rebuild directly --- justfile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/justfile b/justfile index 545ebd3..b2bc758 100644 --- a/justfile +++ b/justfile @@ -2,7 +2,7 @@ HOSTNAME := `hostname -s` # Do as test build without installing 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 @colmena --impure build --on {{hostname}} @@ -34,7 +34,7 @@ web: # Build and run a vm FIXME vm hostname=(HOSTNAME): @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 @echo Running iso build @nixos-rebuild build-vm --flake .#{{hostname}} @@ -42,10 +42,10 @@ vm hostname=(HOSTNAME): result/bin/run-{{hostname}}-vm 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 @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 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: @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 # Clean up @@ -82,19 +82,24 @@ push: # Pull changes from git pull: @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 - @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 - # @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 # Add everything to git ci: @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 +# 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: