Archived
Add baremetal-gui flake target with ZFS RAID0, AMD GPU, and sops-backed wifi
Check NixOS configurations / eval-hosts (pull_request) Successful in 10m40s
Check NixOS configurations / eval-hosts (pull_request) Successful in 10m40s
Wires everything staged so far into a real flake target: - modules/platforms/baremetal.nix (new): the bare-metal platform module, composed from a real nixos-generate-config run on the actual gui-host hardware (AMD CPU, ahci/xhci/usb storage -- modules/hardware-configuration/baremetal.nix). Enables hardware.enableRedistributableFirmware (real wifi/GPU/microcode firmware VMs never needed), amdgpu as the Xorg video driver plus hardware.graphics for Mesa OpenGL/Vulkan, and imports the ZFS RAID0 disko layout + modules/services/zfs/enable-service.nix for root-on-ZFS boot support. - flake.nix: new baremetal-gui target, reusing hosts/nixos/host.nix (same identity already shared across linode/proxmox/lxc-gui). - hosts/nixos/host.nix: added networking.hostId, required now that a ZFS root pool is in the picture. - variables.nix: guiRootDisk1/guiRootDisk2 filled in (/dev/sda, /dev/sdb -- only used transiently at disko-format time, same as modules/disko/proxmox.nix's own plain device path). wifiPassword removed. - modules/networking/wifi.nix: reworked to pull the wifi password from a new sops secret (secrets/gui.yaml, wifi-password) instead of a plaintext variable -- NetworkManager's ensureProfiles renders `psk = "$WIFI_PASSWORD"` literally (nixpkgs' own documented pattern for this) and envsubst-expands it from a sops-rendered EnvironmentFile at activation, so the real value never touches the Nix store, only /run. - .sops.yaml: new secrets/gui\.yaml rule, admin + the currently-registered lxc-gui recipient (the only gui variant with a provisioned host key so far -- whichever variant is actually deployed next still needs scripts/secrets/sync-host-keys.sh run for its own recipient). - README.md/CLAUDE.md: documented the new platform/target and its module layout, per this repo's own drift-prevention note. Verified end-to-end: nix eval of every existing target (nothing broke), a temporary real nixosSystem build against the actual disko.nixosModules.disko confirming the generated zpool create has no mirror/raidz keyword (genuine stripe), and a temporary test SSID confirming the sops secret/template/ ensureProfiles chain renders correctly before reverting to blank/real values. Full scripts/codex-maintenance.sh (secret-grep, fmt, statix, full-fallback eval of every host/package) passes clean.
This commit is contained in:
@@ -8,13 +8,15 @@ workstation.
|
||||
Targets are named `<platform>-<buildtype>`, generated from two orthogonal
|
||||
pieces composed in `flake.nix`:
|
||||
|
||||
- **Platforms** (what it runs on): `linode`, `proxmox`, `lxc`
|
||||
- **Platforms** (what it runs on): `linode`, `proxmox`, `lxc`, `baremetal`
|
||||
- **Build types** (what it's for): `minimal`, `nix-cache`, `server`, `docker`,
|
||||
`gui`, `pxe-boot`, `tailscale-exit-node`, `tor-relay`
|
||||
|
||||
Not every combination exists — `pxe-boot` has no `linode` variant, since
|
||||
PXE/DHCP/TFTP need LAN L2 adjacency that a Linode VPS doesn't have, and
|
||||
`tor-relay` currently only exists as `lxc-tor-relay`. The full list:
|
||||
PXE/DHCP/TFTP need LAN L2 adjacency that a Linode VPS doesn't have,
|
||||
`tor-relay` currently only exists as `lxc-tor-relay`, and `baremetal`
|
||||
currently only exists as `baremetal-gui` (the real gui-host hardware). The
|
||||
full list:
|
||||
|
||||
| Target | Purpose |
|
||||
| --- | --- |
|
||||
@@ -25,6 +27,7 @@ PXE/DHCP/TFTP need LAN L2 adjacency that a Linode VPS doesn't have, and
|
||||
| `linode-server` / `proxmox-server` / `lxc-server` | Storage, NFS, backup, and monitoring exporter host — previously the flat `server` target |
|
||||
| `linode-docker` / `proxmox-docker` / `lxc-docker` | Docker host for the main container stack — previously the flat `docker` target |
|
||||
| `linode-gui` / `proxmox-gui` / `lxc-gui` | Cinnamon desktop workstation — previously the flat `nixos` target |
|
||||
| `baremetal-gui` | Same Cinnamon desktop workstation, on the real gui-host hardware — ZFS RAID0 root, systemd-boot |
|
||||
| `proxmox-pxe-boot` / `lxc-pxe-boot` | HTTP/iPXE boot asset host — previously the flat `pxe-boot` target |
|
||||
| `linode-tailscale-exit-node` / `proxmox-tailscale-exit-node` / `lxc-tailscale-exit-node` | Tailscale exit node |
|
||||
| `lxc-tor-relay` | Tor middle relay |
|
||||
@@ -64,7 +67,7 @@ nix eval --json .#nixosConfigurations --apply builtins.attrNames | jq -r '.[]'
|
||||
| `variables.nix` | Single source of truth for shared values (LAN domain/CIDR, hostnames, timezone, primary username, storage root, NFS share subpaths/mountpoints, service ports, ...) — passed to every module and Home Manager config as the `vars` argument via `specialArgs`/`extraSpecialArgs` |
|
||||
| `hosts/<name>/host.nix` | Per-machine identity: hostname, hostId, per-machine secrets, `system.stateVersion` |
|
||||
| `hosts/nixos/home.nix` | Workstation-specific Home Manager config (used by the `gui` build type) |
|
||||
| `modules/platforms/` | Platform-specific config: virtualisation guest tools, boot method, hardware config (`linode.nix`, `proxmox.nix`, `lxc.nix`) |
|
||||
| `modules/platforms/` | Platform-specific config: virtualisation guest tools, boot method, hardware config (`linode.nix`, `proxmox.nix`, `lxc.nix`, `baremetal.nix`) |
|
||||
| `modules/build-types/` | Build-type-specific config: what makes a system minimal/server/docker/gui/pxe-boot/nix-cache |
|
||||
| `modules/common/` | Shared NixOS config, Home Manager, aliases imported by every host |
|
||||
| `modules/nix-cache/` | Binary cache and remote builder client/server modules |
|
||||
|
||||
Reference in New Issue
Block a user