my nix config
Find a file
Harivansh Rathi e30404a7e1 Add pnpm to netty packages
Co-authored-by: Codex <noreply@openai.com>
2026-03-29 21:44:17 +00:00
config prompts 2026-03-29 17:41:23 -04:00
docs secrets 2026-03-15 14:09:37 -04:00
home remove conflicting credential helper, add --refresh to switch-netty 2026-03-29 17:26:29 -04:00
hosts Add pnpm to netty packages 2026-03-29 21:44:17 +00:00
lib add mise module with codex, remove standalone mise package 2026-03-29 16:36:50 -04:00
modules remove codex brew cask, managed by mise on all machines 2026-03-29 16:37:32 -04:00
scripts supress node warnings 2026-03-29 16:07:35 -04:00
.gitignore symlink karabiner and add git auth 2026-03-28 19:10:17 -04:00
flake.lock lock 2026-03-29 16:36:14 -04:00
flake.nix use pkgs.codex instead of broken openai/codex flake 2026-03-29 16:29:33 -04:00
justfile remove conflicting credential helper, add --refresh to switch-netty 2026-03-29 17:26:29 -04:00
README.md update 2026-03-29 15:42:44 -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

layout

hosts/darwin/   - macOS nix-darwin config
hosts/netty/    - NixOS VPS config (disko + hardware)
modules/        - system-level modules (packages, macos defaults, homebrew)
home/           - Home Manager modules (shell, editor, tools)
lib/            - shared package sets and theme system
config/         - repo-owned config files (nvim, tmux, etc.)
scripts/        - secret management and utility scripts