nixdiag
Static infrastructure docs from any Nix flake: topology, module tree, flake
inputs and an mdBook wiki from nixosConfigurations and
darwinConfigurations.
nix run github:kucendro/nixdiag
Topology comes from the NixOS module system. Adapters read the options you
already set, nixdiag.* options override them.
Both are the two-host fixture, the live demo.
What you get
| File | Contents |
|---|---|
topology.d2, topology.svg | fleet overview: hosts as tables of units and ports, ingress from Internet, LAN and mesh, flows between hosts |
overlay.d2, overlay.svg | every mesh: members, the routes and exit nodes they carry, the control server |
networks.d2, networks.svg | L3: every network, derived from interface addresses or declared, the hosts on it by interface and address, default gateways |
topology-<host>.d2, topology-<host>.svg | per host: its units, local flows, and the hosts it talks to |
modules-<host>.d2, modules-<host>.svg | per host: entry file to the modules it imports, each listing its units |
inputs.d2, inputs.svg | flake input graph; follows edges dashed |
theme.d2 | classes and palette every .d2 imports |
wiki/book.toml, wiki/d2.css, wiki/d2.js | the book: diagrams fit the page, โคข opens one to pan and zoom |
wiki/src/index.md | a stub for your own overview, replaced by indexPage |
wiki/src/architecture.md | topology diagram, networks board, overlay board |
wiki/src/hosts.md | per host: location, platform, users, firewall link, default gateway, interfaces, services and their files, topology, module tree |
wiki/src/services.md | every service, the hosts running it, the file defining it |
wiki/src/endpoints.md | fqdn, port, scope, host, service; ๐ marks what only the VPN (mesh) reaches |
wiki/src/firewall.md | per host: open ports on every interface and on each one, trusted interfaces, findings |
wiki/src/inputs.md, inputs-timeline.svg | every input with its rev and lock date, how many days each trails the newest, plus duplicate detection |
wiki/src/closures.md, closures.svg | opt-in: per-host closure size, largest paths, fleet sharing, stacked bar chart |
Next
- Quickstart
- Topology: adapters,
nixdiag.*options, overrides - Build and serve:
mkDocs, the nginx module - CLI: flags