my nix config
Find a file
Harivansh Rathi 9f1f4f04dd Fix worktree path resolution inside linked worktrees
Resolve the path anchor from the repository common git dir so running wtc from inside an existing worktree still names sibling worktrees from the main checkout root.

Co-authored-by: Codex <noreply@openai.com>
2026-03-30 17:26:46 +00:00
.github/workflows ci + lint 2026-03-30 00:28:59 -04:00
ci/agentcomputer-cli-stub ci + lint 2026-03-30 00:28:59 -04:00
config update treesitter config for v1.x API (configs module removed) 2026-03-29 17:49:27 -04:00
docs secrets 2026-03-15 14:09:37 -04:00
home Add netty worktree helpers 2026-03-30 16:37:46 +00:00
hosts ci + lint 2026-03-30 00:28:59 -04:00
lib rm slop 2026-03-30 00:30:53 -04:00
modules ci + lint 2026-03-30 00:28:59 -04:00
scripts Fix worktree path resolution inside linked worktrees 2026-03-30 17:26:46 +00:00
.gitignore symlink karabiner and add git auth 2026-03-28 19:10:17 -04:00
flake.lock optimize flake shape and add devshell 2026-03-29 23:00:59 -04:00
flake.nix flake parts 2026-03-30 00:06:09 -04:00
justfile flake parts 2026-03-30 00:06:09 -04:00
README.md flake parts 2026-03-30 00:06:09 -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)
modules/        - shared system modules + devshells
modules/hosts/  - flake-parts host output definitions
modules/nixpkgs.nix - shared flake context (hosts, args, pkgs helpers)
home/           - Home Manager modules
lib/hosts.nix   - host metadata used by the flake
lib/            - shared package sets and theme system
config/         - repo-owned config files (nvim, tmux, etc.)
scripts/        - secret management and utility scripts