mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 13:03:45 +00:00
my nix config
| config | ||
| docs | ||
| home | ||
| hosts | ||
| lib | ||
| modules | ||
| scripts | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| justfile | ||
| README.md | ||
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