10 lines
504 B
Makefile
10 lines
504 B
Makefile
|
export GUM_FILTER_HEIGHT := "15"
|
||
|
|
||
|
build hostname=`just _a_host`:
|
||
|
nom build .#nixosConfigurations."{{hostname}}".config.system.build.toplevel --accept-flake-config --show-trace
|
||
|
|
||
|
@_a_host:
|
||
|
hostnames="$(nix eval .#nixosConfigurations --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r)"; \
|
||
|
if test "$(grep <<<"$hostnames" "^$(hostname)$" | wc -l)" -eq 1; then hostnames="$(hostname; grep <<<"$hostnames" -v "^$(hostname)$")"; fi; \
|
||
|
gum <<<"$hostnames" filter --placeholder "Pick a host..."
|