Modular NixOS flake with automatic module loading for multiple hosts.
git clone --depth=1 https://github.com/telometto/nix-config.git
cd nix-config
sudo nixos-rebuild switch --flake .#<hostname>- Auto-loaded modules — Drop files in modules/ or home/ and they're automatically imported
- Role-based defaults — Enable
sys.role.desktoporsys.role.serverfor sensible defaults - Per-host toggles — Enable users and services per machine with
sys.*options
| Directory | Purpose |
|---|---|
| modules/ | System modules (sys.* options) |
| home/ | Home Manager modules (hm.* options) |
| hosts/ | Host configurations |
| vms/ | MicroVM definitions |
| docs/ | Documentation |
# hosts/<hostname>/<hostname>.nix
{
sys.role.desktop.enable = true; # or sys.role.server.enable
sys.desktop.flavor = "kde"; # gnome, kde, hyprland
sys.users.zeno.enable = true; # enable users per host
sys.services.tailscale.enable = true;
}| Command | Description |
|---|---|
sudo nixos-rebuild switch --flake .#<host> |
Apply configuration |
nix build .#nixosConfigurations.<host>.config.system.build.toplevel |
Build only |
nix fmt |
Format repository |
nix flake check |
Run checks |
| Host | Role | Desktop |
|---|---|---|
| snowfall | Desktop | KDE |
| blizzard | Server | None |
| avalanche | Desktop | GNOME |
| kaizer | Desktop | KDE |
| Document | Description |
|---|---|
| Tutorial: Provision Host | Set up a new machine |
| How-To: Add Hosts and Users | Add new hosts/users |
| Reference: Architecture | Options quick reference |
| Explanation: Design | Design decisions |
| Architecture Blueprint | Full system design |
See docs/README.md for the complete documentation index.
This documentation was generated with the assistance of LLMs and may require verification against current implementation.