mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 08:03:44 +00:00
2.3 KiB
2.3 KiB
Nix Config
New Machine
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
Linux
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
nix run github:nix-community/home-manager -- switch --flake path:.#linux -b hm-bak
exec zsh -l
Layout
flake.nix: top-level flake and host wiringhosts/darwin/default.nix: macOS nix-darwin host confighosts/linux/default.nix: standalone Linux Home Manager host configmodules/base.nix: Nix settings and core packagesmodules/macos.nix: macOS defaults and host-level settingsmodules/packages.nix: system packages and fontsmodules/homebrew.nix: the remaining Homebrew-managed GUI appshome/: Home Manager modules for shell, editor, CLI tools, and app confighome/common.nix: shared Home Manager imports used by macOS and Linuxhome/linux.nix: Linux Home Manager entrypointhome/migration.nix: transitional cleanup for old~/dotssymlinksconfig/: repo-owned config files consumed by Home Manager
Ownership Boundaries
- Nix owns packages, dotfiles, shell/editor config, launchd services, and selected macOS defaults
- Homebrew is retained only for a narrow GUI cask boundary
- Keychain items, TCC/privacy permissions, browser history, and most
~/Library/Application Supportstate are intentionally outside declarative Nix ownership
Bitwarden note:
bwis installed via Homebrew asbitwarden-clibwsis not currently managed in this repo because I did not find a supported nixpkgs or Homebrew package for it on macOS during verification- daily shell secrets are synced from Bitwarden into
~/.config/secrets/shell.zshviajust secrets-sync - vault items are currently the source of truth for imported machine secrets and SSH material