Initial cluster config: NixOS flake + k3s + 5 node definitions

- Multi-host flake.nix (3x N97 x86_64 + 2x RPi4 aarch64)
- Shared modules: k3s-cluster, tailscale, meos-gateway
- Node configs: n97-1 (control plane), n97-2/n97-3 (Ollama workers), rpi4-1/rpi4-2 (ARM workers)
- K8s manifests: Forgejo, Postgres (CNPG), Umami, OpenBrain, MeOS Dashboard, MCP servers
- Bootstrap and DB migration scripts
- Migration plan doc (7-day phased rollout)
This commit is contained in:
cos Agent 2026-05-04 12:22:09 -07:00
parent 791a9b6721
commit 7b5ffe6b11
21 changed files with 1184 additions and 2 deletions

48
flake.nix Normal file
View file

@ -0,0 +1,48 @@
{
description = "Scobleclaw Multi-Node Cluster — NixOS + k3s";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
};
outputs = { self, nixpkgs }:
let
shared-modules = [
./modules/tailscale.nix
./modules/k3s-cluster.nix
];
mkSystem = system: hostModule: nixpkgs.lib.nixosSystem {
inherit system;
modules = shared-modules ++ [ hostModule ];
specialArgs = { inherit self; };
};
in {
nixosConfigurations = {
n97-1 = mkSystem "x86_64-linux" [
./hardware-n97.nix
./nodes/n97-1.nix
];
n97-2 = mkSystem "x86_64-linux" [
./hardware-n97.nix
./nodes/n97-2.nix
];
n97-3 = mkSystem "x86_64-linux" [
./hardware-n97.nix
./nodes/n97-3.nix
];
rpi4-1 = mkSystem "aarch64-linux" [
./hardware-rpi4.nix
./nodes/rpi4-1.nix
];
rpi4-2 = mkSystem "aarch64-linux" [
./hardware-rpi4.nix
./nodes/rpi4-2.nix
];
};
};
}