Skip to content

Latest commit

Β 

History

History
64 lines (49 loc) Β· 2.24 KB

File metadata and controls

64 lines (49 loc) Β· 2.24 KB

Setup Scripts β€” Technical Reference

For usage instructions, see README.md. For macOS-specific or Pi-specific setup, see setup-osx.md and setup-pi.md.

Current state

The Nix migration replaced the per-OS package scripts (scripts/setup/packages-*.sh, scripts/setup-osx.sh, etc.) that this file used to document. Those files no longer exist. The scripts that remain are nix wrappers.

β”œβ”€β”€ setup.sh              # Auto-detects platform and runs the right rebuild
β”œβ”€β”€ update.sh             # git pull + submodule update + setup.sh
└── nix/scripts/          # Misc nix helper scripts

What setup.sh does

on macOS    β†’ sudo darwin-rebuild switch --flake .#mac-jenc
on NixOS    β†’ sudo nixos-rebuild switch --flake .#nixos-box
on Linux    β†’ home-manager switch --flake .#fedora
              (also detects Fedora and runs dnf + service bootstrap)

What update.sh does

git pull
git submodule update --init --recursive
./setup.sh

Use this for routine updates. To bump pinned package versions (separate from applying config changes):

nix flake update nixpkgs
./setup.sh
brew upgrade --cask          # Mac only β€” bumps cask-installed apps like claude-code

Package management

Packages are declared in Nix, not in shell arrays:

  • Cross-platform CLI: home/default.nix β†’ home.packages = with pkgs; [ ... ]
  • OS-specific in nix: same file, under lib.optionals isLinux [ ... ] / lib.optionals isDarwin [ ... ] blocks
  • macOS Homebrew (formulae + casks): hosts/mac-jenc/default.nix β†’ homebrew.brews / homebrew.casks (e.g., claude-code is a cask)
  • Linux apt/dnf: handled by the host OS (the Linux Nix configs don't try to manage system packages outside the user environment)

Related docs