-
Install XCode CLI tools
xcode-select --install
-
Install Nix (a reboot could be necessary)
sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
-
Add home-manager and unstable channels
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable nix-channel --update export NIX_PATH=${NIX_PATH:+$NIX_PATH:}$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels
-
Install home-manager
nix-shell '<home-manager>' -A install
-
Install nix-darwin
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer ./result/bin/darwin-installer
-
Clone this repo inside
~/.config/nixpkgs
(must remove default nixpkgs before cloning)rm -r ~/.config/nixpkgs git clone git@github.com:bluemoon/nixfiles.git ~/.config/nixpkgs
-
Install the flake
nix build ~/.config/nixpkgs\#darwinConfigurations.bradford-mbp.system ./result/sw/bin/darwin-rebuild switch --flake .#bradford-mbp
-
Setup home-manager configuration (install and configure programs)
home-manager switch
-
Install Homebrew
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
-
Install apps from Homebrew
NOTEs:
- Takes a loooong time
- Will ask for password a lot of times...
brew bundle --verbose --file ~/.config/nixpkgs/macos/Brewfile