Commit Graph

55 Commits

Author SHA1 Message Date
kurogeek 3302b70485 clan.core.sops.defaultGroups to all machines 2026-06-16 16:46:55 +07:00
kurogeek c85da6b8fc Add user berwn to group admins 2026-06-16 16:44:32 +07:00
kurogeek d50603743e Add user kurogeek to group admins 2026-06-16 16:44:25 +07:00
Berwn 95b9375324 Grant kurogeek admin SSH access on all machines 2026-06-16 16:30:18 +07:00
Berwn 70cbfe84b1 Add user kurogeek to secrets 2026-06-16 16:24:23 +07:00
Berwn a3482face5 Allow ACME DNS-01 dynamic updates on ns1
Add a dedicated acme_ddns TSIG key (scoped to ns1 only) and an acl_acme rule
that limits it to TXT updates at or under _acme-challenge.<zone>. An external
ACME client can now write challenge records via RFC 2136; Knot signs them and
transfers to ns2, which never holds the key.
2026-06-14 17:12:17 +07:00
Berwn 8330eaa8ce Update vars via generator dns-acme-tsig for machine ns1 2026-06-14 17:07:17 +07:00
Berwn dc51cfbdb5 Enable DNSSEC and automatic SOA serials on the DNS zones
ns1 (primary) now signs every zone with an ECDSA P-256/SHA-256 policy and
manages the SOA serial itself: zonefile-load = difference-no-serial (with
journal-content = all) plus serial-policy = dateserial let records be edited
without bumping the serial by hand. ns2 needs no change; it transfers the
already-signed zone.

Also point the ns1/ns2 AAAA glue at the public Hetzner IPv6 addresses; they
previously pointed at unroutable ZeroTier mesh ULAs.
2026-06-14 16:27:30 +07:00
Berwn 5864054b00 Move Hetzner firewall rules into a separate data file
Extract the per-firewall rule data out of control's configuration into
modules/hetzner-firewall-rules.nix, imported like the DNS domains list.
The evaluated rules are unchanged.
2026-06-14 15:49:00 +07:00
Berwn 344f432640 Add Hetzner Cloud firewall auto-sync from clan config
control runs a oneshot on each deploy that creates each firewall if
missing and replaces its rules via the Hetzner API set_rules action,
using a Read/Write token stored as a clan secret. Public SSH is not
exposed; admin access rides the ZeroTier mesh, with emergency-access as
the console fallback.
2026-06-14 15:40:05 +07:00
Berwn dbb67dbd9c Update vars via generator hetzner-firewall for machine control 2026-06-14 15:37:25 +07:00
Berwn 2506b21ffa Enable emergency-access recovery service
Add the clan-core emergency-access service on all nixos machines; it
sets a per-machine recovery root password for console login when a
machine fails to boot.
2026-06-14 15:02:34 +07:00
Berwn 306a2cf61e Set per-machine timezones and enable NTP
control and ns2 use UTC+3 (Etc/GMT-3), ns1 uses UTC+1 (Etc/GMT-1) —
fixed offsets, no DST. Make systemd-timesyncd explicit on all three.
2026-06-14 15:02:34 +07:00
Berwn 91578a2b43 Update vars via generator emergency-access for machine ns2 2026-06-14 15:00:25 +07:00
Berwn ab8288aef9 Update vars via generator emergency-access for machine ns1 2026-06-14 15:00:24 +07:00
Berwn 7b292b8279 Update vars via generator emergency-access for machine control 2026-06-14 15:00:24 +07:00
Berwn 56f0af3153 Fix knot startup on ns1/ns2: TSIG key perms and port 53 conflict
knotd runs as the "knot" user, so the shared TSIG key file needs
owner/group knot — it was root-only and knot couldn't read it.

systemd-resolved's stub listener was holding port 53, so knot's
0.0.0.0@53 / ::@53 TCP bind failed. Disable the stub (resolution
still works via nss-resolve) to free the port.
2026-06-14 14:49:10 +07:00
Berwn 9de95b4fb5 update(inventory.json): Installed ns2 2026-06-14 13:34:17 +07:00
Berwn 099383ccfa update(inventory.json): Installed ns1 2026-06-14 13:29:53 +07:00
Berwn 807785cdab Add authoritative DNS on ns1/ns2 and finalize clan config
- Knot authoritative DNS: ns1 primary, ns2 secondary serving cnx.network,
  buildfor.life and cnx.email over TSIG-secured zone transfer (modules/dns)
- Knot listens publicly + over ZeroTier; firewall opens port 53
- Complete clan inventory: name/domain, admin SSH key, control as the
  zerotier controller, tor on all nixos machines
- Enable age yubikey/fido2-hmac secret plugins
2026-06-14 13:24:23 +07:00
Berwn 9f1a2861ce Add ns2 to secret vars/shared/dns-tsig/tsig.conf 2026-06-14 13:22:43 +07:00
Berwn 2798e8e8f0 Update vars via generator dns-tsig for machine ns1 2026-06-14 13:22:39 +07:00
Berwn a40c4d1800 Set disk schema of machine: ns2 to single-disk 2026-06-14 13:19:56 +07:00
Berwn 2a0bdc4a4b Set disk schema of machine: ns1 to single-disk 2026-06-14 13:19:44 +07:00
Berwn 840b3ca407 machines/ns2/facter.json: update hardware configuration 2026-06-14 13:18:41 +07:00
Berwn d757dc3c52 machines/ns1/facter.json: update hardware configuration 2026-06-14 13:16:11 +07:00
Berwn 80a9761878 Update vars via generator zerotier for machine ns2 2026-06-14 12:36:52 +07:00
Berwn 6aa68a0e4d Update vars via generator zerotier for machine ns1 2026-06-14 12:36:51 +07:00
Berwn 67e60910be update(inventory.json): Installed control 2026-06-14 12:36:24 +07:00
Berwn bf65146a62 Set disk schema of machine: control to single-disk 2026-06-14 12:29:39 +07:00
Berwn 8938637c28 machines/control/facter.json: update hardware configuration 2026-06-14 12:27:20 +07:00
Berwn ede5478952 Update vars via generator tor_tor for machine ns2 2026-06-14 12:20:30 +07:00
Berwn e142ea93c4 Update vars via generator state-version for machine ns2 2026-06-14 12:20:28 +07:00
Berwn 8240948bf3 Update vars via generator root-password for machine ns2 2026-06-14 12:20:27 +07:00
Berwn 29312a9e8d Update vars via generator openssh for machine ns2 2026-06-14 12:20:27 +07:00
Berwn 75f2df3ddf Add machine ns2 to secrets 2026-06-14 12:20:27 +07:00
Berwn b0a99eb16e Update secret ns2-age.key 2026-06-14 12:20:27 +07:00
Berwn f620ca0f48 Update vars via generator tor_tor for machine ns1 2026-06-14 12:20:27 +07:00
Berwn 585e523aff Update vars via generator state-version for machine ns1 2026-06-14 12:20:25 +07:00
Berwn 14fc046763 Update vars via generator root-password for machine ns1 2026-06-14 12:20:25 +07:00
Berwn 061ffaffa0 Update vars via generator openssh for machine ns1 2026-06-14 12:20:24 +07:00
Berwn 8c8a97ab1f Add machine ns1 to secrets 2026-06-14 12:20:24 +07:00
Berwn 63b6f7ce42 Update secret ns1-age.key 2026-06-14 12:20:24 +07:00
Berwn f0672c5326 Update vars via generator zerotier for machine control 2026-06-14 12:20:24 +07:00
Berwn 474f367831 Update vars via generator tor_tor for machine control 2026-06-14 12:20:24 +07:00
Berwn 35fd5bae84 Update vars via generator state-version for machine control 2026-06-14 12:20:21 +07:00
Berwn 11ef4ed182 Update vars via generator root-password for machine control 2026-06-14 12:20:21 +07:00
Berwn 9aeaa94686 Update vars via generator openssh for machine control 2026-06-14 12:20:21 +07:00
Berwn 88511391c4 Add machine control to secrets 2026-06-14 12:20:21 +07:00
Berwn 89ccafa67d Update secret control-age.key 2026-06-14 12:20:21 +07:00