add mars host, move Hermes Agent there from jupiter
New on-site host mars runs Hermes Agent as its sole service: joins the
tailnet, mounts jupiter's samba share at /mnt/jupiter (doubling as
Hermes's shared dropbox), and hosts state locally under /var/lib/hermes.
Same Authentik OIDC app/Telegram bot as before, just relocated — neptun's
hermes.mgaction.town vhost now points at mars.orbit.sol instead of jupiter.
hosts/jupiter/hermes-agent.nix and its three sops secrets are removed;
jupiter's Caddy vhost for it is gone too. Also refreshes tailscale_authkey
across all hosts and fixes two stale "erik@laptop" keys in flake.nix's
kexec/installer-iso images (leftover from a previous laptop, already
swapped out of common.nix back in 2fd5752) to darman@terra.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FHr5ug9pu8q4XPrRkFnzJ
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
Flake-based NixOS config. Hosts: `jupiter` (ZimaBlade, NAS + services),
|
||||
`neptun` (netcup VPS: public reverse proxy, Authentik, headscale),
|
||||
`mercury` (Raspberry Pi 3B+, DNS/DHCP), `terra` (desktop).
|
||||
`mercury` (Raspberry Pi 3B+, DNS/DHCP), `terra` (desktop), `mars` (on-site,
|
||||
single-purpose: Hermes Agent only).
|
||||
|
||||
## Structure
|
||||
|
||||
@@ -26,6 +27,9 @@ hosts/
|
||||
vm.nix # VirtualBox test image (jupiter-vbox)
|
||||
neptun/ # netcup public reverse proxy + tailnet node
|
||||
configuration.nix disk-config.nix hardware-configuration.nix secrets.nix
|
||||
mars/ # on-site, single-purpose: Hermes Agent only
|
||||
configuration.nix disk-config.nix hardware-configuration.nix secrets.nix
|
||||
hermes-agent.nix # Hermes Agent (moved here from jupiter)
|
||||
secrets/ # age-encrypted sops files, one per host
|
||||
scripts/ # deploy, edit_secrets
|
||||
```
|
||||
@@ -84,6 +88,42 @@ an installer, partitions via disko, installs.
|
||||
Manual alternative (USB ISO): boot installer, `disko` the disk, then
|
||||
`nixos-install --flake .#jupiter`.
|
||||
|
||||
## First install on mars
|
||||
|
||||
mars is an older x86_64 box (unknown provenance, "got from work"), on-site,
|
||||
running Hermes Agent only (see `hosts/mars/hermes-agent.nix` — moved there
|
||||
from jupiter). Its age recipient, host key
|
||||
(`~/.config/homelab/mars/ssh_host_ed25519_key`), and `secrets/mars.yaml` are
|
||||
already set up, with `darman_password`/`samba_password`/`opencode_go_api_key`/
|
||||
`telegram_bot_token`/`hermes_dashboard_oidc_client_secret` carried over from
|
||||
jupiter's old instance. Two things are still placeholders and MUST be filled
|
||||
in before installing:
|
||||
|
||||
1. **OS disk id** in `hosts/mars/disk-config.nix` (`ls -l /dev/disk/by-id`
|
||||
once you have console/installer access on the box) — same `REPLACE-ME` in
|
||||
`hosts/mars/configuration.nix`'s comment refers to the same disk, but only
|
||||
`disk-config.nix`'s `device` actually needs editing (grub's own device list
|
||||
comes from disko, see that file's comment).
|
||||
2. **`tailscale_authkey`** in `secrets/mars.yaml` — generate a fresh one
|
||||
(see "Bootstrap the tailnet" under neptun below) rather than reusing an
|
||||
old key; reusable pre-auth keys still expire.
|
||||
|
||||
Boot mode is assumed **legacy BIOS** (grub, not systemd-boot) — unconfirmed;
|
||||
check `[ -d /sys/firmware/efi ]` once you're at the machine and see
|
||||
`hosts/mars/disk-config.nix`'s header comment if it turns out to be UEFI.
|
||||
|
||||
Otherwise the flow is identical to the ZimaBlade steps above:
|
||||
```
|
||||
nix run github:nix-community/nixos-anywhere -- \
|
||||
--flake .#mars \
|
||||
--extra-files /tmp/extra \
|
||||
--generate-hardware-config nixos-generate-config ./hosts/mars/hardware-configuration.nix \
|
||||
--target-host root@<mars-ip>
|
||||
```
|
||||
(stage the host key into `/tmp/extra/etc/ssh/` first, same as step 4 there).
|
||||
Manual alternative (USB ISO): boot installer, `disko` the disk, then
|
||||
`nixos-install --flake .#mars`.
|
||||
|
||||
## First install on terra — no-USB findiso reinstall (replacing CachyOS)
|
||||
|
||||
terra is a Ryzen 9 5900X / Radeon RX 6800 XT desktop, currently running
|
||||
@@ -294,6 +334,20 @@ another way in.
|
||||
sudo tailscale logout && sudo systemctl restart tailscaled-autoconnect
|
||||
```
|
||||
|
||||
### mars
|
||||
|
||||
- **Confirm the OIDC redirect still resolves.** hermes-agent.nix reuses
|
||||
jupiter's old Authentik application (slug `hermes`, redirect
|
||||
`https://hermes.mgaction.town/auth/callback`) unchanged — nothing to
|
||||
reconfigure in Authentik, just verify `neptun`'s `hermes.mgaction.town`
|
||||
vhost (now pointed at `mars.orbit.sol:9119`) actually reaches the
|
||||
dashboard once mars is up and joined the tailnet.
|
||||
- **Carrying forward old chat history/memories:** mars starts with a fresh
|
||||
Hermes state dir (`/var/lib/hermes/.hermes`). jupiter's old instance data
|
||||
is backed up at `/mnt/data/AppData/hermes.bak-2026-08-21` — rsync it over
|
||||
(via the `/mnt/jupiter` samba mount) before the first switch if you want
|
||||
it preserved instead of starting clean.
|
||||
|
||||
### mercury (Raspberry Pi 3B+)
|
||||
|
||||
- `./deploy flash mercury /dev/sdX` writes the dedicated age key to the root
|
||||
|
||||
Reference in New Issue
Block a user