.
├── apps # Nix commands used to bootstrap and build configuration
├── hosts # Host-specific configuration (macOS only currently)
├── modules # macOS and nix-darwin, and shared configuration
xcode-select --install
Via Determinate Systems' installer
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
git clone git@github.com:caliguIa/nix-config.git
find apps/$(uname -m)-darwin -type f \( -name apply -o -name build -o -name build-switch -o -name create-keys -o -name copy-keys -o -name check-keys \) -exec chmod +x {} \;
nix run .#apply
First-time installations require you to move the current /etc/nix/nix.conf
out of the way.
[ -f /etc/nix/nix.conf ] && sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.before-nix-darwin
Edit away, if you want to ensure the build works before deploying the configuration, run:
nix run .#build
Finally, alter your system with this command:
nix run .#build-switch
nix flake update