NixOS configuration management using Nix flakes for declarative, reproducible infrastructure across multiple hosts.
src/
├─ hosts/ # Per-machine configurations
│ ├─ bootstrap/ # Minimal config for bootstrapping new machines
│ ├─ hp-victus-laptop/
│ ├─ macbook/
│ └─ minecraft-server/
├─ modules/
│ ├─ base/ # Core system defaults (user, home-manager, nix, boot)
│ ├─ profiles/ # Composable feature bundles (cli, desktop, server, deploy)
│ ├─ programs/ # Individual app configs (helix, niri, wezterm, git, etc.)
│ ├─ services/ # System services (tailscale, pipewire, stylix, etc.)
│ └─ system/ # Low-level config (bluetooth, zram, localization)
└─ secrets/ # Encrypted secrets managed by agenix
Each host lives in src/hosts/<hostname>/ and contains:
| File | Purpose |
|---|---|
configuration.nix |
Main config, imports modules from profiles/programs |
hardware-configuration.nix |
Hardware-specific settings |
facter.json |
Hardware facts (generated by nixos-facter) |
filesystems.nix / disk-configuration.nix |
Disk layout (disko) |
ssh_host_ed25519_key.pub |
Host public key for agenix secrets |
nix develop # Enter dev shell (loads nushell + bnix commands)
bnix host deploy # Deploy config to existing host
bnix host bootstrap <hostname> # Bootstrap a new machine
bnix host template <hostname> # Create host template files
nix flake check # Validate flake