my nix config
Find a file
2026-03-31 00:23:05 -04:00
.github/workflows ci + lint 2026-03-30 00:28:59 -04:00
config fix lsp 2026-03-31 00:21:26 -04:00
home fix lsp 2026-03-31 00:21:26 -04:00
hosts oil and domain config 2026-03-30 23:51:45 -04:00
lib color 2026-03-30 23:21:00 -04:00
modules optimize the shit out of theme loading 2026-03-30 23:44:32 -04:00
pkgs/sandbox-agent optimize the shit out of theme loading 2026-03-30 23:44:32 -04:00
scripts restore aws 2026-03-30 23:03:32 -04:00
.gitignore nvim fix 2026-03-31 00:09:59 -04:00
flake.lock optimize the shit out of theme loading 2026-03-30 23:44:32 -04:00
flake.nix optimize the shit out of theme loading 2026-03-30 23:44:32 -04:00
justfile flake parts 2026-03-30 00:06:09 -04:00
leverage.md update 2026-03-31 00:23:05 -04:00
README.md finish 2026-03-30 21:44:55 -04:00

nix

nix-darwin + NixOS + Home Manager config.

machines

name type manage
darwin MacBook Pro (aarch64) just switch
netty NixOS VPS (x86_64) just switch-netty

new machine setup

darwin:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
git clone https://github.com/harivansh-afk/nix.git ~/Documents/GitHub/nix
cd ~/Documents/GitHub/nix
sudo nix --extra-experimental-features 'nix-command flakes' run github:nix-darwin/nix-darwin/master#darwin-rebuild -- switch --flake path:.#darwin
exec zsh -l
bw login
export BW_SESSION="$(bw unlock --raw)"
just secrets-sync && just secrets-restore-files
exec zsh -l

netty (from mac):

nix run github:nix-community/nixos-anywhere -- --flake .#netty --target-host netty --build-on-remote

secrets

SSH keys and credentials are stored in Bitwarden. After unlocking:

export BW_SESSION="$(bw unlock --raw)"
just secrets-sync          # shell env vars -> ~/.config/secrets/shell.zsh
just secrets-restore-files # SSH keys, AWS, GCloud, Codex, GitHub CLI

dev

nix develop
just check
just fmt

layout

hosts/darwin/        - macOS host entrypoint
hosts/netty/         - NixOS VPS entrypoint (disko + hardware + services)
modules/             - shared system modules + devshells
modules/hosts/       - flake-parts host output definitions
modules/nixpkgs.nix  - shared flake context (hosts, specialArgs, pkgs)
home/default.nix     - unified home entry (conditional on hostConfig)
home/common.nix      - modules shared across all hosts
home/xdg.nix         - XDG compliance (env vars, config files)
home/security.nix    - SSH/GPG permission enforcement
home/                - per-tool home-manager modules
lib/hosts.nix        - host metadata + feature flags
lib/theme.nix        - centralized color system (gruvbox)
lib/package-sets.nix - shared + host-gated package lists
config/              - repo-owned config files (nvim, tmux, etc.)
scripts/             - secret management and utility scripts
nix-maxxing.txt      - architecture and operations guide