| docs | 1 month ago | ||
| hosts | 1 month ago | ||
| modules | 1 month ago | ||
| secrets | 3 months ago | ||
| .gitignore | 2 months ago | ||
| README.md | 1 month ago | ||
| flake.lock | 4 months ago | ||
| flake.nix | 3 months ago | ||
NixOS configurations for the two NixOS hosts. Flake-based (flake.nix)
with disko for disk layout, agenix for secrets, and deploy-rs for
push-based deploys from a workstation (the canonical workflow, magic-rollback
on). Hosts can also self-update with git pull && nixos-rebuild switch on the
box — handy when the workstation can't cross-build the target closure.
| Host | IP (mgmt) | Role |
|---|---|---|
xlab-gateway |
10.253.254.1 | Lab gateway / WAN router. Bond + VLANs (lan254, wan99, mgmt) + WireGuard tunnels with policy routing, NAT/masquerade. Kea DHCP4/6, radvd, fail2ban. |
skydick |
10.0.1.1 | Storage server. ZFS data pool with hot spares; Samba (LDAP-backed passdb) + NFS + iSCSI. Jumbo frames (MTU 9200) over bonded 2×40G ConnectX-3 (LACP 802.3ad, bond40g). |
flake.nix # entrypoint, defines both hosts + deploy-rs nodes
hosts/
xlab-gateway/
default.nix # host config (boot, users, packages, smartd)
networking.nix # bond/VLAN/WG/nftables/services.resolved
dhcp.nix # Kea DHCP4/6 + DDNS
disko.nix # ZFS root layout
hardware-configuration.nix
skydick/
default.nix # host config + most networking inline
datapool.nix # ZFS pool layout, Samba + LDAP integration
disko.nix # boot disk layout
samba-ldap-bootstrap.ldif
modules/
common.nix # locale, packages, sshd hardening defaults
users.nix # ldx user + ssh keys
ssh.nix # sshd hardening
monitoring.nix # node-exporter, smart, etc.
secrets/ # agenix-encrypted (.age files)
ssh ldx@<host> cd /etc/nixos && sudo git pull && sudo nixos-rebuild switch --flake /etc/nixos#<host>
# From an aarch64-darwin Mac (can't cross-build the x86_64-linux closure): nix run github:serokell/deploy-rs -- --remote-build --skip-checks .#<host>
--remote-build builds on the target (its store is reachable asssh-ng://ldx@<host>); --skip-checks skips nix flake check, whose
x86_64-linux deployChecks can't be built on darwin. Magic-rollback is on, so a
bad activation auto-reverts. Note: deploy-rs activates a closure but does not
update /etc/nixos git on the host — use the on-the-box git pull flow if you
want the host's checkout to track main.
DNS: both hosts route DNS via 10.0.0.1 (mosdns) with a fallback set
in services.resolved.fallbackDns. Don't add a co-primary nameserver tonetworking.nameservers — systemd-resolved load-balances and bypasses
the analytics filter on 10.0.0.1.
IPv6 RA: skydick runs IPv6 enabled (SLAAC, stable token ::d1c0 onbond40g). RA-provided DNS is kept out of systemd-resolved with UseDNS = false in ipv6AcceptRAConfig — not by disabling IPv6. Pin the stable
token address with IPv6PrivacyExtensions = lib.mkForce false (NixOS forces"kernel" otherwise) and tempAddress = "disabled". Do not reintroduceenableIPv6 = false / accept_ra = 0 on skydick.
deploy-rs ssh user: defined as ldx with sudo escalation to root.
Make sure the host key in secrets.nix matches reality after a reinstall
(rekey all secrets if the host key changes).
gitbucket.skyw.top/Skyworks/skyworks-Nix-infra is canonical. No GitHub
remote configured.