- Nix 100%
| hardware-configs | ||
| modules | ||
| overlays | ||
| .envrc.example | ||
| .gitignore | ||
| AGENTS.md | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
Nix Configuration
Declarative, reproducible system configuration using Nix for macOS (nix-darwin) and NixOS. Includes cross-platform development environments for VA projects.
Architecture
This repository uses a dendritic (tree-like) modular architecture with flake-parts and import-tree. Configurations are organized by feature/capability rather than by host:
modules/
├── base/ # Core system: fonts, homebrew, nix-settings, zsh
├── dev/ # Development: cli-tools, editors, git
├── desktop/ # GUI: gnome, gaming, audio (NixOS)
├── services/ # Daemons: ollama, open-webui, monitoring, smb-mount, syncthing, icloud-backup (Darwin)
├── hosts/ # Host-specific: a6mbp, gnarbox, inix, mbp, studio (mbp/a6mbp/studio/inix darwin, gnarbox NixOS)
└── dev-envs/ # VA project environments
Each host imports and composes feature modules. See modules/README.md for detailed structure.
Hosts
mbp (personal macOS)
Personal MacBook Pro with syncthing and personal apps (gaming, messaging, document tools).
Location: modules/hosts/mbp.nix
a6mbp (work macOS)
Work MacBook Pro with syncthing and work tools (AWS, Docker, DDEV, Slack, Zoom).
Location: modules/hosts/a6mbp.nix
studio (media server macOS)
Media server Mac running the full service stack: ollama, open-webui, monitoring (Prometheus + Grafana), SMB mount, syncthing, and iCloud backup.
Location: modules/hosts/studio.nix
iNix (Intel macOS)
Garage and shop machine for reading manuals, project plans, and occasional remote work. Runs on a 2017 iMac Pro (Intel Xeon W) with macOS + nix-darwin. Includes syncthing.
Location: modules/hosts/inix.nix
gnarbox (NixOS desktop)
NixOS desktop with GNOME, gaming (Steam + Proton GE), and PipeWire audio. Uses the unstable overlay for select packages.
Location: modules/hosts/gnarbox.nix
Shared Configuration
All darwin hosts share common packages via feature modules. All hosts (including NixOS) share Nix packages for CLI tools, editors, and fonts.
Feature modules own both platform aspects: darwin uses homebrew.brews/homebrew.casks, NixOS uses environment.systemPackages. This keeps each capability self-contained.
- CLI tools (both platforms):
modules/dev/cli-tools.nix - Git tools (both platforms):
modules/dev/git.nix - Editor tools (both platforms):
modules/dev/editors.nix - Homebrew infrastructure:
modules/base/homebrew.nix(onActivation settings, taps, darwin-only items) - Font: MesloLGS Nerd Font (see
modules/base/fonts.nix)
Prerequisites
Apple Silicon Macs (mbp, a6mbp, studio): Install Determinate Nix Installer:
curl -fsSL https://install.determinate.systems/nix | sh -s -- install --determinate
Intel Mac (inix): Determinate Systems lists x86_64-darwin as unsupported. Use the official upstream Nix installer instead (multi-user is the default on macOS):
curl -L https://nixos.org/nix/install | sh
All macOS hosts also need Homebrew installed first. nix-darwin's homebrew module manages your Brewfile; it does not install Homebrew itself. If brew isn't already on the machine:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
NixOS: Nix comes pre-installed.
Installation
Clone the repository:
git clone https://git.snowboardtechie.com/bryan/nix-configs.git ~/code/nix-configs
cd ~/code/nix-configs
Build and activate:
macOS — Apple Silicon (mbp, a6mbp, studio):
First-time bootstrap of nix-darwin (Determinate has flakes enabled already):
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake '.#mbp' # or '.#a6mbp', '.#studio'
Subsequent rebuilds:
darwin-rebuild switch --flake '.#mbp'
macOS — Intel (inix):
The upstream Nix installer doesn't enable flakes by default, and modules/base/nix-settings.nix keeps nix.enable = false on darwin (defers Nix config to Determinate, which inix doesn't have). Enable flakes system-wide in /etc/nix/nix.conf so both your user and sudo invocations see them:
echo "experimental-features = nix-command flakes" | sudo tee -a /etc/nix/nix.conf
Bootstrap nix-darwin (this is the step that creates the darwin-rebuild command):
cd ~/code/nix-configs
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake '.#inix'
Open a new shell, then subsequent rebuilds:
sudo darwin-rebuild switch --flake '.#inix'
NixOS (first build requires experimental features flag):
sudo nixos-rebuild switch --flake '.#gnarbox' --extra-experimental-features 'nix-command flakes'
Usage
Apply Changes
macOS:
darwin-rebuild switch --flake '~/code/nix-configs#mbp'
NixOS:
sudo nixos-rebuild switch --flake '~/code/nix-configs#gnarbox'
Update Dependencies
nix flake update
# then rebuild using commands above
Development Environments
Cross-platform development environments for VA projects:
- vets-website: Node 22.22.0, Yarn 1.x, Cypress → vets-website
- vets-api: Ruby 3.3.6, PostgreSQL, Redis, Kafka → vets-api
- next-build: Node 24, Yarn 3.x, Playwright → next-build
- component-library: Node 22, Yarn 4.x, Puppeteer → component-library
- content-build: Node 14.15.0, Yarn 1.x, Cypress → content-build
- simpler-grants: Node 20, Python 3.11, pnpm (corepack) → simpler-grants-protocol (Poetry must be installed separately via
brew install poetryorpipx install poetry)
Activate manually:
nix develop '~/code/nix-configs#vets-website'
Development environment definitions are located in modules/dev-envs/.
OpenCode
The OpenCode CLI is installed via Homebrew (opencode) on darwin systems and via nixpkgs on NixOS. The OpenCode desktop app (opencode-desktop cask) is installed on mbp and inix.
Authentication:
Authenticate your AI providers:
opencode auth login
Usage:
Start the CLI:
opencode
Documentation:
Resources
3 gits, one repo
This repository syncs to multiple remotes. The primary repository is at git.snowboardtechie.com, with backups on Codeberg and GitHub.
License
This configuration is free to use and modify for your own purposes.