Files
nix-config-ryan4yin/vars
Ryan Yin 2c7629000f refactor: rename the three VM hosts to 12kingdoms-*
Drop the now-meaningless kubevirt- prefix and move the hosts out of
hosts/k8s/, following the existing 12kingdoms-shoukei layout: the
directory and output carry the theme prefix while the configuration,
hostname and colmena target are the bare name (shoryu, shushou, youko).

- hosts/k8s/kubevirt-* -> hosts/12kingdoms-*; the shared disko config
  becomes host-disko-fs.nix; the now-different relative imports are fixed
- outputs, vars/networking.nix keys, the Justfile recipes/tags, the eval
  tests and the docs follow
- colmena reaches these hosts by IP (a new targetHost override), since
  their DNS name changes with the hostname and is not resolvable until
  the router learns it
2026-09-21 17:10:14 +08:00
..
2026-03-16 15:30:24 +08:00
2025-08-21 15:32:50 +08:00

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: KubeVirt guests, K3s nodes
  • Kubernetes clusters: Production and testing environments
  • 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.