justfile: fixups

This commit is contained in:
Peder Bergebakken Sundt 2024-08-05 00:02:20 +02:00
parent cd015a26b8
commit d94e53e8b0
1 changed files with 5 additions and 5 deletions

View File

@ -21,16 +21,16 @@ update:
@echo "$(date +%Y-%m-%d)" > .direnv/pull-date @echo "$(date +%Y-%m-%d)" > .direnv/pull-date
build: build:
nixos-rebuild build --show-trace --flake . nixos-rebuild build --accept-flake-config --show-trace --flake .
test: test:
sudo nixos-rebuild test --show-trace --flake . sudo nixos-rebuild test --accept-flake-config --show-trace --flake .
switch: switch:
sudo nixos-rebuild switch --show-trace --flake . sudo nixos-rebuild switch --accept-flake-config --show-trace --flake .
boot: boot:
sudo nixos-rebuild boot --show-trace --flake . sudo nixos-rebuild boot --accept-flake-config --show-trace --flake .
push hostname=`just _a-host` cmd=`gum choose test switch boot --header "Select mode..."`: push hostname=`just _a-host` cmd=`gum choose test switch boot --header "Select mode..."`:
nixos-rebuild build --flake .#{{hostname}} nixos-rebuild build --flake .#{{hostname}}
@ -38,7 +38,7 @@ push hostname=`just _a-host` cmd=`gum choose test switch boot --header "Select m
NIX_NO_NOM=1 NIX_SSHOPTS="-tt" nixos-rebuild {{cmd}} --flake .#{{hostname}} --use-remote-sudo --target-host $(nix eval .#nixosReports.{{hostname}}.fqdn --json | jq . -r) --use-substitutes NIX_NO_NOM=1 NIX_SSHOPTS="-tt" nixos-rebuild {{cmd}} --flake .#{{hostname}} --use-remote-sudo --target-host $(nix eval .#nixosReports.{{hostname}}.fqdn --json | jq . -r) --use-substitutes
@_a-host: @_a-host:
nix eval .#nixosReports --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r | gum filter --placeholder "Pick a host..." nix eval .#nixosConfigurations --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r | gum filter --placeholder "Pick a host..."
@remote-current: @remote-current:
>&2 echo Current remote: $(remote-host) >&2 echo Current remote: $(remote-host)