mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
Reserve 192.168.5.192/27 as a dedicated kube-vip block, outside the router's DHCP pool (.2-.99): one /29 per cluster, k3s-test-1 gets .192/29 with the API VIP at .193. Advertise only youko itself (.183/32) and that block over Tailscale, instead of the whole /24. The /24 route shadowed hosts that are already reachable directly, e.g. idols-ai at 192.168.5.100. Deploy prerequisites (not in this repo): approve the new Tailscale routes; point kube-vip at the new VIP; move the *.writefor.fun wildcard from .101 to .183 and update scripts/darwin_set_proxy.py, since .101 is no longer advertised.
Variables
Common variables and configuration used across my NixOS and nix-darwin configurations.
Current Structure
vars/
├── README.md
├── default.nix # Main variables entry point
└── networking.nix # Network configuration and host definitions
Components
1. default.nix
Contains user information, SSH keys, and password configuration:
- User credentials (username, full name, email)
- Initial hashed password for new installations
- SSH authorized keys (main and backup sets)
- Public key references for system access
2. networking.nix
Comprehensive network configuration including:
- Gateway settings: Main router and proxy gateway configurations
- DNS servers: IPv4 and IPv6 name servers
- Host inventory: Complete mapping of all hosts with their network interfaces and IP addresses
- SSH configuration: Remote builder aliases and known hosts configuration
- Network topology: Physical machines, VMs, Kubernetes clusters, and SBCs
Host Categories
The networking configuration covers:
- Physical machines: Desktop PCs, Apple Silicon systems, SBCs
- Virtual machines: VM guests, K3s nodes
- Kubernetes clusters: the
k3s-test-1testing cluster - Network infrastructure: Routers, gateways, and DNS configuration
Usage
These variables are imported and used throughout the configuration to ensure consistency across all hosts and maintain centralized network and security settings.