Files
nix-config-ryan4yin/vars/README.md
T
ryan4yin | 二花 58d1af8f9d feat(youko): add pull-through cache for two Nix upstreams (#499)
Run nginx on youko as a loopback pull-through HTTP cache for
cache.nixos.org and cache.numtide.com, exposed by Caddy at
https://nix-cache.writefor.fun.

Assisted-by: DeepSeek Harness (deepseek-flash)
2026-11-01 18:27:43 +08:00

1.8 KiB

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
└── ports.nix           # Loopback HTTP backend port registry

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
  • Remote-builder client host keys (remoteBuilderClientKeys) that may build through aquamarine

2. networking.nix

Defines:

  • Gateway settings: Main router and proxy gateway configurations
  • Home LAN (lanCidr): the trusted LAN prefix the shared host firewall trusts by source
  • Cluster addressing: clusterULA6, the IPv6 ULA prefix for MicroVM guest addresses, and k8sVip, each k3s cluster's kube-vip API and LoadBalancer VIP block
  • DNS servers: IPv4 and IPv6 name servers
  • Host inventory: static LAN hosts and their interfaces; DHCP/mobile hosts (such as the macOS hosts) are omitted by design. homeOnly = true marks an address that exists only at home; SSH aliases and monitoring skip it
  • SSH configuration: Host aliases and known hosts configuration
  • Network topology: Physical machines, VMs, Kubernetes clusters, and SBCs

Host Categories

networking.nix maps each host to its LAN address and interface. The authoritative inventory is ../hosts/README.md; this file holds only the addresses.

Usage

These variables are imported and used throughout the configuration.