Commit Graph
68 Commits
Author SHA1 Message Date
beatzaplentyandClaude Sonnet 5 87eb8f7c39 Expand variables.nix: NFS shares, ports, image size, GC/rotation, Pi host
Check NixOS configurations / eval-hosts (push) Failing after 10m51s
Adds nested vars.nfsShares (subpath + mountpoint per dataset, previously
duplicated independently across server.nix's NFS exports, mount-data.nix's
client mounts, docker.nix's tmpfiles rules, traefik's log rotation path,
and hosts/server/host.nix's beszel config), vars.ports (every literal port
in modules/ and hosts/, kept as separate entries per service even where
numbers coincide so changing one can't silently change another), plus
vars.proxmoxImageSize, vars.nixCacheGcMaxAge, vars.traefikLogRotate, and
raspberryPiHost/raspiNfsPath/raspiMountpoint for the Pi's own NFS export.

Also fixes docker.nix/minimal.nix/gui.nix hardcoding the literal "nixos"
username instead of the existing vars.primaryUser, found during the sweep.

system.stateVersion is deliberately left untouched everywhere -- per
NixOS's own docs that value must stay fixed from first install, not
follow any shared variable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01La55Nsss8jZ7ZuzUV9mfot
2026-07-20 08:27:37 +10:00
beatzaplentyandClaude Sonnet 5 3a821158ca Add parameterized beszel host-token helper module
hosts/server/host.nix and hosts/nix-cache/host.nix each hand-rolled the
same sops secret/template/environmentFile wiring for the beszel agent
token, differing only in the sops file path and template name. Factor
it into modules/beszel/host-token.nix ({ name, sopsFile }) so a third
host can adopt it without copy-pasting the boilerplate again. Also
drops two dead, stale commented-out HUB_URL lines left over from
before variables.nix grew a homeDomain var.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01La55Nsss8jZ7ZuzUV9mfot
2026-07-20 02:57:55 +10:00
beatzaplentyandClaude Sonnet 5 6dcbae5659 Centralize shared values into variables.nix
One file (variables.nix) holding every value that was previously
hardcoded and repeated across modules: LAN domain/CIDR, home/tailnet
domains, cross-host references (nix-cache substituter hostname, NFS
server hostname, remote-builder user), PXE/PBS IPs, timezone, and the
primary username.

Wired in via flake.nix's specialArgs (and home-manager's
extraSpecialArgs for the two home.nix files), so any module picks it
up by just adding `vars` to its function arguments — no explicit
import needed. Two hosts (nix-cache, server) now derive their own
networking.hostName from the same variable other hosts use to reach
them, so there's exactly one place to change either identifier.

Purely mechanical: every substituted value matches what was already
there, confirmed by identical toplevel .drv paths for all 17 targets
before and after.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 14:51:37 +10:00
beatzaplentyandClaude Sonnet 5 2f7831aea8 Migrate live secrets to sops-nix (Milestone 2)
Check NixOS configurations / eval-hosts (push) Failing after 11m5s
Audited the working tree and full git history for committed secrets
(gitleaks + trufflehog + manual grep, see secrets-inventory.md, kept
local/gitignored per the spec). Found: a password hash shared by root
and the nixos user across every host, two live Beszel monitoring
tokens, and a GitHub fine-grained PAT embedded in a home-manager
nix.conf.

Migrates all of them to sops-nix:
- .sops.yaml + secrets/*.yaml, encrypted for admin + the age keys
  derived (via ssh-to-age) from each live host's existing SSH host
  key — no new key material transferred to any machine.
- users.users.{root,nixos}.hashedPasswordFile replaces the inline
  hashedPassword shared by every target.
- The GitHub PAT moves from a home-manager-managed, store-visible
  nix.conf to a sops.templates-rendered file included via nix.conf's
  native !include, system-wide instead of per-user.
- Beszel TOKEN moves from `environment` (store-visible) to
  `environmentFile` (runtime-only via sops.templates); the dead
  commented-out docker token is removed from the tree entirely.

Added a tracked pre-commit hook (gitleaks protect --staged, wired via
core.hooksPath) so a secret can't be committed by accident again, and
documented the sops workflow in README.md.

Structural verification only: all 17 flake targets evaluate, and
`nix build --dry-run --no-link` succeeds for the three currently
deployed hosts. Per CLAUDE.md, actual `nixos-rebuild switch` — the
step that confirms secrets decrypt and services start on a real
machine — is left for manual verification.

Git history still contains the original plaintext secrets; scrubbing
history (Milestone 3) and rotating every credential (Milestone 4) are
separate, deliberately gated steps per remove-sensetive-info-refactor.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 12:46:39 +10:00
beatzaplentyandClaude Sonnet 5 c05e3a3821 Refactor flake targets into platform x build-type matrix
Check NixOS configurations / eval-hosts (push) Failing after 12m2s
Generates all nixosConfigurations from mkTarget(platform, buildType,
hostPath) instead of hand-written per-host blocks, so adding a new
platform or build type is a one-line addition. Per-machine identity
(hostname, hostId, secrets, stateVersion) moves into hosts/<name>/host.nix;
platform-specific config (hardware, boot, networking) into
modules/platforms/*.nix; build-type config (minimal/server/docker/gui/
nix-cache/pxe-boot) into modules/build-types/*.nix.

Old flat targets (nixos, docker, server, nix-cache, nix-minimal, pxe-boot)
are replaced by the 17-target <platform>-<buildtype> matrix; each new
target was verified to evaluate before its old counterpart was removed.
CI workflows and docs/aliases now discover hosts dynamically via
nixosConfigurations attrNames and /etc/flake-target instead of hardcoded
lists, so they can't drift from flake.nix again.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 12:03:33 +10:00
beatzaplenty 14accceb02 updated to efi boot and resolved module paths
Check NixOS configurations / eval-hosts (push) Failing after 25m24s
2026-07-19 06:27:22 +10:00
beatzaplenty 345b5ca657 moved common into modules
Check NixOS configurations / eval-hosts (push) Failing after 18m43s
2026-07-13 16:03:48 +10:00
beatzaplenty c128bff2bf change path
Check NixOS configurations / eval-hosts (push) Failing after 18m45s
2026-07-13 14:29:29 +10:00
beatzaplenty 8aff9fff29 fix syntax
Check NixOS configurations / eval-hosts (push) Failing after 16m50s
2026-07-13 14:10:38 +10:00
beatzaplenty 8f468d5703 enable beszel agent debugging
Check NixOS configurations / eval-hosts (push) Failing after 14m58s
2026-07-13 14:09:33 +10:00
beatzaplenty 690ecb1eb0 update path
Check NixOS configurations / eval-hosts (push) Failing after 14m32s
2026-07-13 14:04:36 +10:00
beatzaplenty 1ed1b388f5 change paths
Check NixOS configurations / eval-hosts (push) Failing after 14m25s
2026-07-13 13:57:37 +10:00
beatzaplenty f338843166 update extra filesystems
Check NixOS configurations / eval-hosts (push) Failing after 15m4s
2026-07-13 13:49:58 +10:00
beatzaplenty 1c1f65560c update path
Check NixOS configurations / eval-hosts (push) Failing after 14m40s
2026-07-13 13:44:50 +10:00
beatzaplenty 258ebfe1bf fix syntax
Check NixOS configurations / eval-hosts (push) Failing after 14m51s
2026-07-13 13:37:59 +10:00
beatzaplenty 45cb9c38e8 added extra filesystems
Check NixOS configurations / eval-hosts (push) Failing after 14m56s
2026-07-13 13:36:36 +10:00
beatzaplenty 960548c2ac added raspi-backup share
Check NixOS configurations / eval-hosts (push) Failing after 11m30s
2026-07-13 11:44:45 +10:00
beatzaplenty 229cd06f73 updated server configuration
Check NixOS configurations / eval-hosts (push) Failing after 14m23s
2026-07-13 05:55:40 +10:00
beatzaplenty 5da5401e91 remove commented lines 2026-07-13 02:26:46 +10:00
beatzaplenty 07534e64fc fix syntax 2026-07-13 02:14:21 +10:00
beatzaplenty 54cefce90a removed port from firewall
Check NixOS configurations / eval-hosts (push) Failing after 13m55s
2026-07-13 02:05:13 +10:00
beatzaplenty fcb8f5e01e modularized rpcbind enable and added to server config
Check NixOS configurations / eval-hosts (push) Failing after 13m58s
2026-07-13 02:00:55 +10:00
beatzaplenty 529a518cd1 removed promotheus exporter
Check NixOS configurations / eval-hosts (push) Successful in 33m35s
2026-07-12 19:09:46 +10:00
beatzaplenty c470737316 added beszel agent
Check NixOS configurations / eval-hosts (push) Failing after 6m31s
2026-07-12 18:08:44 +10:00
beatzaplenty aa08bf60b9 removed tailscale
Check NixOS configurations / eval-hosts (push) Failing after 6m52s
2026-07-08 13:24:43 +10:00
beatzaplenty 6c973e2300 typo
Check NixOS configurations / eval-hosts (push) Failing after 6m58s
2026-07-08 13:00:26 +10:00
beatzaplenty eb2d3e3260 added tailscale exit node module and enabled on server
Check NixOS configurations / eval-hosts (push) Failing after 6m55s
2026-07-08 12:48:52 +10:00
beatzaplenty a488ff507e Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 6s
2026-07-01 22:28:36 +00:00
beatzaplenty 9685233553 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 1s
2026-07-01 22:17:33 +00:00
beatzaplenty 837096ca28 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 3s
2026-07-01 21:58:20 +00:00
beatzaplenty bd550b9c2e Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 2s
2026-07-01 21:53:01 +00:00
beatzaplenty 5e8037d02b Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 4s
2026-07-01 21:50:42 +00:00
beatzaplenty 1af8079a8e Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 3s
2026-07-01 21:32:24 +00:00
beatzaplenty 030d344ea2 moved docker data mounts into one module
Check NixOS configurations / eval-hosts (push) Failing after 14m16s
2026-07-01 20:58:19 +10:00
beatzaplenty 0edb1a431e Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 7m1s
2026-07-01 10:27:05 +00:00
beatzaplenty 8f32ccdd0f Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 44m18s
add ,crossmnt option to volumes NFS export
2026-07-01 09:47:53 +00:00
beatzaplenty 3e298b8c6e Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 47m20s
2026-07-01 05:42:19 +00:00
beatzaplenty f7baaf88bb Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 1h21m30s
2026-07-01 05:29:17 +00:00
beatzaplenty c25c5d4fbc Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 6m57s
2026-06-30 21:59:48 +00:00
beatzaplenty 29b1b86286 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 6m55s
2026-06-30 21:55:42 +00:00
beatzaplenty 33be42e3ca Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 6m45s
2026-06-30 21:51:37 +00:00
beatzaplenty 28c875e8cb Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 6m48s
2026-06-30 21:48:02 +00:00
beatzaplenty 09a50f8ff2 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 7m9s
2026-06-30 21:40:38 +00:00
beatzaplenty 161888b037 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 7m37s
2026-06-30 21:34:55 +00:00
beatzaplenty 3578e66a15 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 6m52s
2026-06-30 21:22:20 +00:00
beatzaplenty f759f98f97 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 7m12s
2026-06-30 21:15:41 +00:00
beatzaplenty 36a5287b7b Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 6m47s
2026-06-30 21:01:31 +00:00
beatzaplenty 04692c33f2 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 6m59s
2026-06-30 20:55:53 +00:00
beatzaplenty da3f4b16c9 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 25m35s
2026-06-30 20:49:46 +00:00
beatzaplenty f00364bd14 Update hosts/server/configuration.nix
Check NixOS configurations / eval-hosts (push) Failing after 25m29s
2026-06-30 20:39:52 +00:00