lkjdsalkjdsalkjdsalkj
This commit is contained in:
@@ -16,10 +16,10 @@ repl $hostname=`just _a_host`:
|
||||
NIX_NO_NOM=1 nixos-rebuild --flake .#"$hostname" repl
|
||||
|
||||
report hostname=`just _a_host`:
|
||||
nix eval .#nixosReports."{{hostname}}" --json | yq . --yaml-output | bat --language yaml --style plain --paging never
|
||||
nix eval .#nixosReports."{{hostname}}" --json --show-trace | yq . --yaml-output --width=999999 | bat --language yaml --style plain --paging never
|
||||
|
||||
reports:
|
||||
nix eval .#nixosReports --json | yq . --yaml-output | bat --language yaml --style plain --paging never
|
||||
nix eval .#nixosReports --json --show-trace | yq . --yaml-output --width=999999 | bat --language yaml --style plain --paging never
|
||||
|
||||
update:
|
||||
git reset flake.lock
|
||||
@@ -80,6 +80,7 @@ inspect-config host=`just _a_host` prefix="":
|
||||
|
||||
@_a_host:
|
||||
hostnames="$(nix eval .#nixosConfigurations --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r)"; \
|
||||
if test "$(grep <<<"$hostnames" "^$(just remote-current)$" | wc -l)" -eq 1; then hostnames="$(just remote-current; grep <<<"$hostnames" -v "^$(just remote-current)$")"; fi; \
|
||||
if test "$(grep <<<"$hostnames" "^$(hostname)$" | wc -l)" -eq 1; then hostnames="$(hostname; grep <<<"$hostnames" -v "^$(hostname)$")"; fi; \
|
||||
gum <<<"$hostnames" filter --placeholder "Pick a host..."
|
||||
|
||||
@@ -105,8 +106,9 @@ inspect-config host=`just _a_host` prefix="":
|
||||
gum <<<"$hostnames" filter --placeholder "Pick a host..." --no-limit
|
||||
|
||||
@remote-current:
|
||||
# printf "%s\n" "Current remote: $(remote-host)" # slow
|
||||
printf "%s\n" "Current remote: $(tomlq <.remote.toml '.hosts | to_entries[] | select(.value.default==true) | .value.host' -r)"
|
||||
# remote-host # slow
|
||||
test ! -s .remote.toml || \
|
||||
printf "%s\n" "$(tomlq <.remote.toml '.hosts | to_entries[] | select(.value.default==true) | .value.host' -r)"
|
||||
|
||||
@remote-list:
|
||||
tomlq <.remote.toml '.hosts | to_entries[] | "remote-set \(.key+1) # -> \(.value.host)"' -r
|
||||
@@ -114,7 +116,9 @@ inspect-config host=`just _a_host` prefix="":
|
||||
@remote-set remote=`just remote-current >&2 && just _a_remote_label`:
|
||||
remote-set "{{remote}}"
|
||||
|
||||
@motd: remote-current remote-list
|
||||
@motd:
|
||||
printf "%s\n" "Current remote: $(just remote-current)"
|
||||
just remote-list
|
||||
printf "\n"; \
|
||||
todos=$(rg 'TODO' | wc -l); \
|
||||
if [[ "$todos" -gt 10 ]]; then \
|
||||
|
||||
Reference in New Issue
Block a user