A unified Nix flake managing NixOS workstations, a laptop, a macOS machine, and a container host — with shared modules, home-manager integration, and remote deployment.
| Host | System | Role |
|---|---|---|
| north | x86_64-linux | Main workstation — COSMIC + GNOME, AI (ComfyUI), streaming, gaming |
| minibook | x86_64-linux | Portable laptop — GNOME, encrypted disk, Waydroid |
| macbook | aarch64-darwin | Apple Silicon Mac — nix-darwin, yabai/skhd |
| rukako | x86_64-linux | Container host — Proxmox LXC, Caddy, Mailcow |
flake.nix # Flake inputs & host definitions
hosts/
north/ # North-specific config & modules
minibook/ # Minibook-specific config & packages
macbook/ # macOS-specific nix-darwin config
rukako/ # Container host bootstrap
modules/
DE/ # Desktop environment modules
cosmic.nix # COSMIC DE + LightDM (slick-greeter)
gnome.nix # GNOME DE + excluded default apps
hyprland.nix # Hyprland WM (optional)
shared/ # Shared between all hosts
users.nix
keyboard.nix
nix-settings.nix
packages/common.nix
packages/development.nix
nixos/ # Linux-only system services
packages.nix
deluge.nix
reaper.nix
ai/comfyui.nix # ComfyUI (CUDA, port 8188)
network/nas-nfs-mount.nix
multimedia.nix # mpv, GIMP, Strawberry, etc.
home-manager/
default.nix # Common user config (all platforms)
platforms/linux.nix # Linux-specific user config
platforms/darwin.nix # macOS-specific user config
modules/ # Composable HM modules
emacs.nix
dconf.nix
hyprland-config.nix
linux.nix
...
- Nix with flakes enabled
- For NixOS hosts: SSH root access for remote deployment
- For macbook: nix-darwin installed
Enable flakes if not already set:
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.confAlways build before switching to catch evaluation errors early.
# Build a specific host (no activation)
sudo nixos-rebuild build --flake .#north
sudo nixos-rebuild build --flake .#minibook
# macOS
darwin-rebuild build --flake .#macbook
# Build all NixOS hosts via Makefile
make build
# Build a specific host via Makefile
make build-north
make build-minibook# Switch the local machine (NixOS)
sudo nixos-rebuild switch --flake .#north
# Switch via Makefile (deploys over SSH as root)
make deploy-north
make deploy-minibook
make deploy-rukako # uses fixed IP 192.168.88.8
# Deploy all NixOS hosts
make deploy
# macOS (run locally on the Mac)
darwin-rebuild switch --flake .#macbook
make deploy-macbook- Create the file under the appropriate directory (e.g.
modules/myfeature.nix) - Add it to the relevant host's module list in
flake.nix - Stage with
git addbefore building — the flake evaluator only sees git-tracked files:git add modules/myfeature.nix sudo nixos-rebuild build --flake .#north
- Create
hosts/<name>/configuration.nix(and any host-specific modules) - Add a new
nixosSystem(ordarwinSystem) entry inflake.nix - Stage the new files:
git add hosts/<name>/ - Build:
sudo nixos-rebuild build --flake .#<name>
- Stage files before building. Nix flakes only see git-tracked files. Any new or moved file must be
git add-ed before running a build or you'll get a "path does not exist" error. - Build before committing. Always run
nixos-rebuild buildand confirm it succeeds before committing to git. - Modules are self-contained. Each module under
modules/DE/includes everything to enable that feature — packages, services, PAM, portals, etc. Enable a whole subsystem by importing one file.
To build a Proxmox LXC container template for rukako:
nix build .#proxmox-lxc
# or
make proxmox-lxcConfigured in modules/shared/nix-settings.nix:
cache.nixos.org(default)nix-community.cachix.orgcuda-maintainers.cachix.orgnur.cachix.org
| Input | Purpose |
|---|---|
nixpkgs |
Base NixOS packages |
home-manager |
User environment management |
nix-darwin |
macOS system configuration |
stylix |
Unified theming across HM and system |
nur |
Nix User Repository overlay |
streaming-setup |
OBS (CPU/CUDA), Reaper, audio tools |
comfyui-nix |
ComfyUI AI image generation |
kmonad |
Keyboard remapper |
nixos-generators |
Build Proxmox LXC images |