feat(network): nixos firewall #120

Merged
nick merged 1 commit from nick/dotfiles:nixos-firewall into main 2026-11-15 02:40:35 -05:00
Owner
No description provided.
The network as data in network/ (links, dials, tunnels, sites, forwards),
resolved into network.json with eval-time consistency checks; it reproduces
the live box's 318 per-link rules and its DNS records exactly.

The firewall host (systems/firewall, modules/nixos/firewall): networkd VLANs
and WireGuard, nftables rendered from the data, Unbound, sshguard, Alloy, a
disko btrfs layout with impermanence and root rotation, and its own sops.

packages/firewall: firewall-verify (live state against the data, on a
timer), wg-peer (peer configs) and firewall-install, run by the offline
installer ISO (nixosConfigurations.firewall-installer).

WireGuard server keys for wg0-wg2 in sops; deploy node, CI host and records
for the firewall; the unused sol device stub removed. Plan in
packages/firewall/PLAN.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
network/switch.nix holds the SG200-26's port map, from the owner's
topology. Each port's tags are derived: the firewall's trunks every tag,
a machine's its own and its guests' (the link's new `guests` range), the
router's is an access port on 103. network.json is version 2 with it.

sg200 ports the topology's expect script to Haskell, speaking Telnet
itself. The port it runs over goes last, ports marked atCutover (the
router's, today the house's gateway) need --cutover, and nothing is saved
after a refusal. --dry-run prints the commands.

The data also gains openbao_priv at its reserved address, every vhost
Caddy serves as a site, and torrent_priv's qbittorrent and canticle ports
the right way round.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner's topology, with its SG200 port labels, now reads every tag,
address, host placement, tunnel and switch port from network/ instead of
recomputing them; the drawings are byte-identical. Its switch commands and
expect script became network/switch.nix and sg200. It fails to build if
it and network/ name different VMs or put one in different groups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs(firewall): phases 4 and 5 status
Some checks failed
CI / build (ceres) (pull_request) Has been cancelled
CI / build (deimos) (pull_request) Has been cancelled
CI / build (eris) (pull_request) Has been cancelled
CI / build (firewall) (pull_request) Has been cancelled
CI / build (lamdagibson) (pull_request) Has been cancelled
CI / build (mars) (pull_request) Has been cancelled
CI / build (phobos) (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
27e34a77a8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(nixos): hosts and guests on their links
Some checks failed
CI / build (ceres) (pull_request) Has been cancelled
CI / build (deimos) (pull_request) Has been cancelled
CI / build (eris) (pull_request) Has been cancelled
CI / build (firewall) (pull_request) Has been cancelled
CI / build (lamdagibson) (pull_request) Has been cancelled
CI / build (mars) (pull_request) Has been cancelled
CI / build (phobos) (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
593ce7d2fd
Instance records name their link (`microvm.link`), and their ip and gate
come from network/, so Caddy, Alloy, Grafana, the guests' allowlists and
the bookmarks follow. homelab.microvms gives a linked guest its /31, the
firewall as gateway and DNS, and its tag as vsock CID (the last octet gave
two guests CID 1).

homelab.hostNetwork builds each host's VLAN-filtering bridge from the
data: the uplink trunks the host's tag and its guests', each tap is an
access port, and the host keeps its 192.168.50.x address on untagged lan
as the way in. ceres, eris and mars use it; mars's wired side moves from
NetworkManager to networkd and its dev-VM NAT goes. checks.network-bridge
proves the design: guests meet only through the firewall, can't choose
another tag, and the host keeps lan.

Not deployed: every host's default route is now the firewall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nick force-pushed nixos-firewall from 593ce7d2fd
Some checks failed
CI / build (ceres) (pull_request) Has been cancelled
CI / build (deimos) (pull_request) Has been cancelled
CI / build (eris) (pull_request) Has been cancelled
CI / build (firewall) (pull_request) Has been cancelled
CI / build (lamdagibson) (pull_request) Has been cancelled
CI / build (mars) (pull_request) Has been cancelled
CI / build (phobos) (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
to a9c41564dc
Some checks failed
CI / build (ceres) (pull_request) Has been cancelled
CI / build (deimos) (pull_request) Has been cancelled
CI / build (eris) (pull_request) Has been cancelled
CI / build (firewall) (pull_request) Has been cancelled
CI / build (lamdagibson) (pull_request) Has been cancelled
CI / build (mars) (pull_request) Has been cancelled
CI / build (phobos) (pull_request) Has been cancelled
CI / check (pull_request) Has been cancelled
2026-11-15 02:40:16 -05:00
Compare
nick merged commit a8a30d1441 into main 2026-11-15 02:40:35 -05:00
nick deleted branch nixos-firewall 2026-11-15 02:40:36 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
upRootNutrition/dotfiles!120
No description provided.