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>
This commit is contained in:
beatzaplentyandClaude Sonnet 5 committed 2026-07-19 12:03:33 +10:00
1 parent 302c3b671f
commit e76486efbe
31 files changed
+529 -699

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
{ ... }:
{
imports = [
../hardware-configuration/vm/linode.nix
];
networking = {
usePredictableInterfaceNames = false;
useDHCP = false;
interfaces.eth0.useDHCP = true;
};
}
+8
View File
@@ -0,0 +1,8 @@
{ ... }:
{
boot.isContainer = true;
boot.loader.grub.enable = false;
boot.loader.systemd-boot.enable = false;
}
+9
View File
@@ -0,0 +1,9 @@
{ ... }:
{
imports = [
../hardware-configuration/vm/proxmox.nix
../boot/efi.nix
../disko/proxmox.nix
];
}