improved just file
added just ssh for ygg services
This commit is contained in:
parent
575a113803
commit
05bca5b139
2 changed files with 25 additions and 0 deletions
24
justfile
24
justfile
|
|
@ -16,6 +16,30 @@ update:
|
||||||
lint:
|
lint:
|
||||||
nix fmt
|
nix fmt
|
||||||
|
|
||||||
|
# gather ips
|
||||||
|
[group('dev')]
|
||||||
|
gather:
|
||||||
|
ip-gather
|
||||||
|
|
||||||
|
# gather ips
|
||||||
|
[group('dev')]
|
||||||
|
get-key machine:
|
||||||
|
ssh-keyscan -t ed25519 olympus 2>/dev/null | ssh-to-age
|
||||||
|
|
||||||
|
# Auto SSH resolution
|
||||||
|
[group('dev')]
|
||||||
|
ssh host:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
addr=$(jq -r --arg host "{{host}}" '.[$host] // empty' hosts.json)
|
||||||
|
if [ -n "$addr" ]; then
|
||||||
|
echo "Connecting to $addr for {{host}}"
|
||||||
|
ssh "$addr"
|
||||||
|
else
|
||||||
|
echo "Hostname '{{host}}' not found in hosts.json"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Check nix flake
|
# Check nix flake
|
||||||
[group('dev')]
|
[group('dev')]
|
||||||
check:
|
check:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
name = "nixos-unified-template-shell";
|
name = "nixos-unified-template-shell";
|
||||||
meta.description = "Shell environment for modifying this Nix configuration";
|
meta.description = "Shell environment for modifying this Nix configuration";
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
jq
|
||||||
self'.packages.ip-gather
|
self'.packages.ip-gather
|
||||||
deploy-rs
|
deploy-rs
|
||||||
ssh-to-age
|
ssh-to-age
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue