Commit Graph
100 Commits
Author SHA1 Message Date
beatzaplentyandClaude Sonnet 5 d8d14db505 Extract ports, docker host, and remote-builder keys into variables.nix
Pulls the beszel hub / PVE / PBS ports, the docker-compose host's LAN
name, and the remote-builder client SSH keys out of scattered inline
literals across modules/hosts and into variables.nix as the single
source of truth, matching the existing pattern for other cross-host
references (nixCacheHost, nfsServerHost).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01La55Nsss8jZ7ZuzUV9mfot
2026-07-20 02:57:38 +10:00
beatzaplentyandClaude Sonnet 5 be05c63a67 Switch LXC targets from NetworkManager to systemd-networkd
boot.isContainer disables services.udev, which NetworkManager depends on
to enumerate devices — this left NM unable to reliably manage the
container veth, breaking DHCP-hostname registration in Pi-hole. It also
defaulted networking.useHostResolvConf to true, which assumes a
systemd-nspawn-style resolv.conf bind-mount that real Proxmox LXC doesn't
provide (nixpkgs' own proxmox-lxc.nix module forces this false for the
same reason). Also guard the networkmanager extraGroups membership in the
minimal/gui build-types, since that group only exists when NM is enabled.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01La55Nsss8jZ7ZuzUV9mfot
2026-07-20 01:16:29 +10:00
beatzaplenty ff695c1917 added lxc-nix-cache key 2026-07-19 17:22:20 +10:00
beatzaplenty fa2a9a595e updated sops keys 2026-07-19 16:59:44 +10:00
beatzaplentyandClaude Sonnet 5 a90c4909d5 Consolidate minimal-buildtype hosts onto a single nix-minimal identity
linode-minimal, proxmox-minimal, and lxc-minimal now all share
hosts/nix-minimal/host.nix instead of three separate per-platform
host files with different hostnames — every minimal-buildtype host is
named nix-minimal regardless of which platform it runs on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 16:30:02 +10:00
beatzaplentyandClaude Sonnet 5 649be34dcf Enable boot.loader.initScript for LXC targets
LXC containers share the host kernel — Proxmox starts them by exec'ing
/sbin/init directly in the container's rootfs, no bootloader or initrd
involved at all. Without boot.loader.initScript.enable, that file
isn't wired to launch the current generation, so even a correctly
installed system (see the nix-auto-installer bind-mount fix, same
underlying issue) could still fail to come up after reboot. This is
exactly what nixpkgs' own virtualisation/proxmox-lxc.nix module sets
for the same reason.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 16:11:17 +10:00
beatzaplenty 3c3c5ae821 updated sops keys 2026-07-19 15:06:59 +10:00
beatzaplentyandClaude Sonnet 5 eadb1e35ce 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 71d052e737 Migrate live secrets to sops-nix (Milestone 2)
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 e76486efbe Refactor flake targets into platform x build-type matrix
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
beatzaplentyandClaude Sonnet 5 302c3b671f Sync host lists with flake.nix and add CLAUDE.md
Remove the nonexistent kuma host and add the missing linode-minimal
host across README, AGENTS.md, docs, and CI eval workflows so they
match flake.nix's nixosConfigurations. Also add CLAUDE.md with
architecture/safety guidance for future Claude Code sessions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 09:48:05 +10:00
beatzaplenty 0900ff25ae updated to efi boot and resolved module paths 2026-07-19 06:27:22 +10:00
beatzaplenty 79d2ed0314 remove swap label 2026-07-18 08:14:39 +10:00
beatzaplenty 8932e52d72 updated to efi boot 2026-07-18 07:52:30 +10:00
beatzaplenty 4822f0b290 updated proxmox disko configuration 2026-07-18 05:54:32 +10:00
beatzaplenty f8de4c8abc removed fileSystems definition for disko config 2026-07-17 11:42:29 +10:00
beatzaplenty ca18a9d29d update configuration 2026-07-17 09:18:24 +10:00
beatzaplenty 7d113e302f update grub config 2026-07-15 13:23:09 +10:00
beatzaplenty bc68d8cf17 disabled disko module 2026-07-15 13:10:09 +10:00
beatzaplenty 4728982c05 updated mounts 2026-07-15 12:59:08 +10:00
beatzaplenty 8734b23746 updated mounts 2026-07-15 12:57:45 +10:00
beatzaplenty 5f52cb0cd7 disabled disko in linode-minimal 2026-07-15 12:47:35 +10:00
beatzaplenty f4139eec13 updated bios partition definition 2026-07-15 11:44:03 +10:00
beatzaplenty afc57e3755 remove grub mount point 2026-07-15 11:29:52 +10:00
beatzaplenty d7cad12720 remove bios type 2026-07-15 11:25:25 +10:00
beatzaplenty bab83d1aad added bios partition 2026-07-15 11:22:21 +10:00
beatzaplenty da0cd225be removed duplicate boot entry 2026-07-15 11:08:50 +10:00
beatzaplenty de4b4302c9 add boot loader path 2026-07-15 11:05:12 +10:00
beatzaplenty 45fe770569 remove file systems. they are defined in disko 2026-07-15 10:29:10 +10:00
beatzaplenty 3797c8885e updated disko config 2026-07-15 09:59:37 +10:00
beatzaplenty 2fb6b1de00 update linode host folder name to linode-minimal 2026-07-15 09:38:12 +10:00
beatzaplenty a2f817b098 add linode disko config 2026-07-15 09:36:04 +10:00
beatzaplenty d9015e87d3 updated flake 2026-07-15 09:28:33 +10:00
beatzaplenty 5dc41e2866 added disko configuration to remove disk formatting from auto installer 2026-07-15 07:30:32 +10:00
beatzaplenty 0aae9c3bcf Merge branch 'main' of https://gitea.lan.ddnsgeek.com/beatzaplenty/nixos 2026-07-14 20:52:05 +10:00
beatzaplenty 2a426615cb update hardware config 2026-07-14 20:50:21 +10:00
beatzaplenty 7be80e7ab6 Update hosts/nix-minimal/configuration.nix 2026-07-13 14:07:57 +00:00
beatzaplenty d8d2718289 update module path 2026-07-13 19:49:45 +10:00
beatzaplenty e577fda538 updated flake.lock 2026-07-13 19:44:35 +10:00
beatzaplenty ffd2705ee3 revert 2026-07-13 19:22:10 +10:00
beatzaplenty 54e11853b5 update module path 2026-07-13 19:19:39 +10:00
beatzaplenty 5fcaa6ae87 update disko path 2026-07-13 19:17:43 +10:00
beatzaplenty a5ef1aa519 added disko configuration 2026-07-13 19:10:21 +10:00
beatzaplenty a919252a47 create linode flake 2026-07-13 17:46:12 +10:00
beatzaplenty 3fda26e46c update common home path 2026-07-13 16:07:17 +10:00
beatzaplenty d48e4d4f10 moved common into modules 2026-07-13 16:03:48 +10:00
beatzaplenty d5c13bc2d2 remove hardware configuration 2026-07-13 15:50:24 +10:00
beatzaplenty fe83640776 change path 2026-07-13 14:29:29 +10:00
beatzaplenty 03066d716d fix syntax 2026-07-13 14:10:38 +10:00
beatzaplenty bcf57246e0 enable beszel agent debugging 2026-07-13 14:09:33 +10:00
beatzaplenty 9fb6d9da13 update path 2026-07-13 14:04:36 +10:00
beatzaplenty 24dd5adfed change paths 2026-07-13 13:57:37 +10:00
beatzaplenty 489ed11406 update extra filesystems 2026-07-13 13:49:58 +10:00
beatzaplenty f77a26402f update path 2026-07-13 13:44:50 +10:00
beatzaplenty 9eb219360e fix syntax 2026-07-13 13:37:59 +10:00
beatzaplenty a3fe69a89c added extra filesystems 2026-07-13 13:36:36 +10:00
beatzaplenty aa7a98f884 remove commented lines 2026-07-13 13:23:42 +10:00
beatzaplenty af48b1aef6 remove raspi docker data mount 2026-07-13 12:48:14 +10:00
beatzaplenty 33522a4613 permit root login 2026-07-13 12:39:58 +10:00
beatzaplenty 217564ffc4 fix path 2026-07-13 12:15:00 +10:00
beatzaplenty 8e571c7592 add docker backup share 2026-07-13 12:12:58 +10:00
beatzaplenty 7ea203e22d added raspi-backup share 2026-07-13 11:44:45 +10:00
beatzaplenty 567e2536b1 updated server configuration 2026-07-13 05:55:40 +10:00
beatzaplenty f3c6f13e89 add boot include to zfs mount module 2026-07-13 03:33:09 +10:00
beatzaplenty b9b3d06810 fix path typo 2026-07-13 02:56:20 +10:00
beatzaplenty efa0ee26fe modularized locale settings 2026-07-13 02:43:08 +10:00
beatzaplenty 0c68f54e1f remove commented lines 2026-07-13 02:26:46 +10:00
beatzaplenty c9b449d60e add pkgs 2026-07-13 02:16:05 +10:00
beatzaplenty a495de3f83 fix syntax 2026-07-13 02:14:49 +10:00
beatzaplenty 6cc79e0c36 fix syntax 2026-07-13 02:14:21 +10:00
beatzaplenty 4078230052 removed port from firewall 2026-07-13 02:05:13 +10:00
beatzaplenty 06dc25c983 modularized rpcbind enable and added to server config 2026-07-13 02:00:55 +10:00
beatzaplenty aa2af2d169 updated module paths 2026-07-13 01:53:32 +10:00
beatzaplenty 1788faf093 updated flake.lock 2026-07-13 01:45:44 +10:00
beatzaplenty 33584d9a02 fix typo 2026-07-13 01:44:05 +10:00
beatzaplenty b25d9db82b clean up commented lines 2026-07-13 01:42:28 +10:00
beatzaplenty 94df02515d removed let statement 2026-07-13 01:34:19 +10:00
beatzaplenty 8b49deb1d7 modularized docker health to gotify service 2026-07-13 01:29:45 +10:00
beatzaplenty fac343fa76 modularized nextcloud cron job 2026-07-13 01:25:16 +10:00
beatzaplenty 9f59ed4426 modularized raspi mount 2026-07-13 01:12:43 +10:00
beatzaplenty 1f2dc03486 update log path 2026-07-13 01:09:34 +10:00
beatzaplenty da75a23700 modularized traefik log rotatation config 2026-07-13 01:05:44 +10:00
beatzaplenty 3d42dee0bf update path 2026-07-13 01:00:03 +10:00
beatzaplenty 9fef163850 updated module directory structure 2026-07-13 00:56:19 +10:00
beatzaplenty c64e4ad7d5 enable tailscale module 2026-07-13 00:46:07 +10:00
beatzaplenty aeaa1f6479 modularized tailscale service 2026-07-13 00:44:29 +10:00
beatzaplenty bca8c2f9df move docker system packages to docker-service module 2026-07-13 00:36:52 +10:00
beatzaplenty 153b2f0cfa added pkgs include 2026-07-13 00:32:06 +10:00
beatzaplenty c1ba633bff modularized docker service 2026-07-13 00:30:10 +10:00
beatzaplenty 62edbd203d removed promotheus exporter 2026-07-12 19:09:46 +10:00
beatzaplenty fa3d91303c added beszel agent 2026-07-12 18:21:03 +10:00
beatzaplenty 59a01b35bf added beszel agent 2026-07-12 18:08:44 +10:00
beatzaplenty cf78588f00 added beszel port to firewall 2026-07-12 17:07:42 +10:00
beatzaplenty 7156c343bb remove beszel agent from docker and create module 2026-07-12 15:48:18 +10:00
beatzaplenty 32b65b0894 add semi colons 2026-07-10 08:01:58 +10:00
beatzaplenty 5046cae7b1 fix nix syntax 2026-07-10 08:00:37 +10:00
beatzaplenty 0286bb4dfa syntax change 2026-07-10 07:56:16 +10:00
beatzaplenty cf9bb14d4b updated beszel syntax 2026-07-10 07:51:54 +10:00
beatzaplenty 6d53a62f85 added beszel agent 2026-07-10 07:40:26 +10:00
beatzaplenty 4bf1ec450a removed tailscale 2026-07-08 13:24:43 +10:00