nixos/station
nixos/station/alerts.nix
The units whose failure mails root through alert-mail@. Each one fails where nothing else would say so: the heartbeat is the only report of a missed backup or a missing backup volume, the receiver and its socket are what the nodes push to, a scrub is the only report of a rotten block (disko.nix names the two units' filesystems), smartd is the only watch on the disk, and tailscaled with its flag-setting unit is the only shell into this host. The Telegram agent fails only when its session keeps ending at once; then the bot is silent. Forgejo, its nightly dump, the units that make the owner's account and register the runners, and the mirror run fail with no one looking. So do Prometheus, whose failure is a hole in the history found only later, and Grafana, and Syncthing with btrbk, whose archive and its snapshots keep what a workstation deleted. So does Radicale with btrbk, whose snapshots keep an event that a client deleted. The push watch is the only report of a node that went quiet, and the Pushgateway is what the nodes push to. The archive of the Hermes state is what restic snapshots, and a failed build leaves yesterday's file in the snapshot with nothing said. The exporters and the zram timer are left out: an empty panel shows their failure, and a timer that fails each half minute would flood the mailbox. A unit that fails with the link down is left out, as the mail could not leave either
nixos/station/boot.nix
3.7 GiB of RAM cannot back the 50G tmpfs the shared boot module asks for, for the reason nixos/laptop/boot.nix gives. /tmp stays on the system volume and is swept at boot
nixos/station/default.nix
nixos/station/disko.nix
The whole disk, as the installer creates it and as the system mounts it. The btrfs options
are set here and not in rokokol.btrfs.mounts: both write fileSystems.
nixos/station/hardware-configuration.nix
Generated by nixos-generate-config --no-filesystems --show-hardware-config on the station.
disko.nix beside this file declares the file systems
nixos/station/mya-agent.nix
The Telegram agent edits the archive's folders and the owner's calendars. Syncthing runs as the agent's user, so a file the agent makes stays writable to Syncthing, and the agent's edits reach every peer. The rest of the backup volume, the snapshots among them, and Syncthing's keys stay out of its sight
Units: hermes-agent
nixos/station/network.nix
A fixed address on the wired link and no NetworkManager. The router reserves the same address for this MAC, so the host stays reachable on the LAN with or without the reservation. The link gets its name from its permanent MAC, so a firewall rule can name it. The network matches the MAC too and not the name: if the rename ever fails, the host keeps its address. The Wi-Fi card matches nothing and stays down
nixos/station/sops.nix
The station decrypts only its own file, encrypted to its own key and the owner's. A secret from the desktops' file is not in it, and sops-nix fails the build for a missing key
nixos/station/system.nix
Accounts come from this configuration alone. The password is the console login, which is the way back in when the tailnet is down; root has none and is reached through sudo. sops-nix decrypts a neededForUsers secret before the users are created
nixos/station/wake-pc.nix
wake-pc sends a magic packet to the PC. The packet goes to the directed broadcast of the LAN
in network.nix. The kernel's local table binds that address to the wired link, and that table
is read before any rule of the skvpn TUN. The limited broadcast, 255.255.255.255, belongs to
no link, so the kernel picks the link for it