devops/nodes/rpi4-1.nix
Marcus (agent-cos) 7b5ffe6b11 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)
2026-05-04 12:22:09 -07:00

36 lines
853 B
Nix

{ config, lib, pkgs, ... }:
let
tailscaleIP = "100.x.x.x";
in {
networking.hostName = "rpi4-1";
services.k3s-cluster = {
enable = true;
role = "agent";
serverAddr = "https://100.x.x.x:6443"; # n97-1 IP
tailscaleIP = tailscaleIP;
tokenFile = "/var/lib/k3s/cluster-token";
};
# ARM worker — light services only
# Taints/tolerations will be set via kubectl to prevent x86 pods landing here
networking.firewall = {
enable = true;
trustedInterfaces = [ "tailscale0" ];
};
users.users.sscoble = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
security.sudo.extraRules = [{
users = [ "sscoble" ];
commands = [{ command = "ALL"; options = [ "NOPASSWD" ]; }];
}];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.trusted-users = [ "sscoble" ];
}