Skip to content

Instantly share code, notes, and snippets.

@okuuva
Last active June 28, 2025 20:40
Show Gist options
  • Save okuuva/722a84289356f85250bd7b406c08d582 to your computer and use it in GitHub Desktop.
Save okuuva/722a84289356f85250bd7b406c08d582 to your computer and use it in GitHub Desktop.
nix-darwin setup

Install nix. When prompted whether to install Determinate Nix, answer "No".

curl -fsSL https://install.determinate.systems/nix | sh -s -- install

Clone and link the nix-config.

mkdir -p ~/gits
cd ~/gits
git clone https://github.com/okuuva/nix.git nix-config
sudo ln -sv ~/gits/nix-config /etc/nix-darwin
cd /etc/nix-darwin
git switch work

Run darwin-rebuild first with nix run

sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake .#oula-mbp-a2485-work

After cloning dotfiles (not linking them here), run the following command:

scripts/make-links.sh --work --display --keyboards

Restart.

Going forward, darwin-rebuild should be in PATH:

sudo darwin-rebuild switch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment