Personal NixOS flake for two users across multiple machines, built with Home Manager.
- Theme system — 9 themes (Nord, Catppuccin, Dracula, Gruvbox, Tokyo Night, Everforest, Rose Pine, One Dark, Kanagawa) with live switching via
Super+Shift+Space. Themes cover Waybar, Dunst, Kitty, Neovim, Starship, Rofi, GTK. - Hyprland Wayland compositor
- Programs — Fish, Neovim, VSCode, Zen Browser, Rofi, Starship, tmux
- Services — SSH, Docker, Kubernetes (k3s), Traefik, Ollama (local LLM)
- Gaming — WoW addon managers (wago-addons, warcraftlogs, CurseForge)
- Multi-user — per-user Home Manager configs with separate identities
flake.nix Entry point — nixosConfigurations
hosts/ Per-machine configs + hardware configuration files
modules/
games/ Gaming-related modules (wago-addons, warcraftlogs)
nix/ Nix daemon settings
rice/ Desktop environment modules (Hyprland, GNOME, themes)
services/ System services (SSH, Traefik, Ollama)
system/ Core system config (users, virtualization)
home/
<user>.nix Top-level Home Manager entry per user
programs/ Per-program HM configs
services/ Per-service HM configs (Dunst)
themes/ Theme system (registry, per-theme assets)
overlays/ Custom package overlays
users/
lanath/profile.nix Personal data for user lanath (single source of truth)
mushu/profile.nix Personal data for user mushu
keys/ SSH public keys (one file per user)
Copy an existing profile and fill in your data:
cp -r users/lanath users/<yourname>
$EDITOR users/<yourname>/profile.nixFields to update:
username— your Unix usernamehomeDir— your home directory (usually/home/<username>)hashedPassword— generate withmkpasswd -m yescryptsshKeyFiles— list of filenames inkeys/to authorize for SSH logingit.*— name, email(s), GPG key fingerprint
Add your SSH public key(s) to keys/:
cp ~/.ssh/id_ed25519.pub keys/<yourname>.pubcp modules/system/user/lanath.nix modules/system/user/<yourname>.nix
# Edit the import path to point to your profile
$EDITOR modules/system/user/<yourname>.nixcp home/lanath.nix home/<yourname>.nix
$EDITOR home/<yourname>.nixCopy and adjust the per-program configs under home/programs/ as needed.
cp hosts/lanath-desktop.nix hosts/<hostname>.nix
$EDITOR hosts/<hostname>.nixGenerate your hardware configuration:
nixos-generate-config --show-hardware-config > hosts/<hostname>-hardware-configuration.nixReplace the hardware UUID and kernel module references with the generated output.
In flake.nix, add your user to homeManagerModule:
home-manager.users.<yourname> = import ./home/<yourname>.nix;And add your host to nixosConfigurations:
<hostname> = mkHost ./hosts/<hostname>.nix;sudo nixos-rebuild switch --flake .#<hostname>
# or
make <hostname>| Command | Description |
|---|---|
make <host> |
Rebuild and switch to a host config |
make update |
Update all flake inputs |
make clean |
Remove old generations and collect garbage |
nix build .#nixosConfigurations.<host>.config.home-manager.users.<user>.home.activationPackage |
Test HM build without switching |
The *-hardware-configuration.nix files contain machine-specific UUIDs and kernel modules. They are not reusable across machines — always generate a fresh one with nixos-generate-config on your target hardware.