NixOS flake for all my machines: Niri + Noctalia (plus two Hyprland session variants: waybar and qs-shell/Quickshell), Ghostty, Neovim, tmux, and a dev-first setup with local LLMs. Built on flake-parts; home-manager runs as a NixOS module.
| Host | Hardware | User | Notes |
|---|---|---|---|
| atlas | Surface Laptop Studio, i7, 32GB RAM | carter | nixos-hardware Surface module, CPU-only Ollama |
| kronos | Ryzen 9 9950X, RTX 5070 12GB, 64GB RAM | cjm | LUKS + btrfs, GPU Ollama + llama.cpp heavy mode |
git clone https://github.com/cartermccann/dotfiles ~/dotfiles
# Validate without sudo
nh os build ~/dotfiles
# Apply (or use the `nrs` alias)
sudo nixos-rebuild switch --flake ~/dotfiles#kronosupdate (alias) rebuilds with updated flake inputs.
flake.nix # inputs; outputs delegated to parts/
parts/ # flake-parts modules: hosts (mkHost), templates
hosts/ # per-machine configuration + hardware config
modules/ # NixOS system modules (desktop, nvidia, ollama, oom-protection, ...)
home/ # home-manager modules (shell, tools, neovim, tmux, niri, hyprland, ...)
lib/ # overlays + the hyprland palette
pkgs/ # custom package definitions
templates/ # dev-shell templates for `nix flake init -t ~/dotfiles#<lang>`
config/nvim/ # Neovim config, symlinked out of the store so it stays live-editable
scripts/ # shell scripts referenced by modules
docs/ # project specifications, architecture, and delivery plans
wallpaper/
- Create
hosts/<hostname>/with aconfiguration.nix(import the modules you need) and the machine'shardware-configuration.nix. - Register it in
parts/hosts.nix:flake.nixosConfigurations.myhost = mkHost "myhost" { user = "myuser"; };
sudo nixos-rebuild switch --flake ~/dotfiles#myhost
- Niri (Noctalia) — primary session; config in
home/niri-noctalia.nix. - Hyprland — the glass rice (Hyprland 0.55 Lua config), two tiles: "Hyprland" (waybar) and "Hyprland (QS)" (qs-shell/Quickshell);
home/hyprland.nix+lib/palette.nix.
Both share ghostty, tmux, and the helper scripts in home/niri.nix.
Ollama runs in a podman container (modules/ollama.nix); models are preloaded per host tier via local.ollamaTier:
| Tier | Hardware | Models |
|---|---|---|
| high | 12GB VRAM | gemma4:12b-it-qat, Qwythos-9B, qwen2.5-coder:3b, qwen3.5:4b |
| medium | CPU, 32GB RAM | qwen3.5:4b, llama3.2:3b |
| low | smaller | llama3.2:3b |
heavy / heavy-stop (fish functions) swap the GPU between Ollama and a llama.cpp server running Qwen3.6-35B MoE with expert offload (modules/llama-heavy.nix).
Per-language templates live in templates/ and auto-activate via direnv:
nix flake init -t ~/dotfiles#python # node, python, go, rust, elixir, zig, java, c, ruby, deno
echo "use flake" > .envrc && direnv allowShell aliases and fish functions are defined in home/shell.nix.