Note
These are my old dotfiles with gnu stow.
My new config can be found at nix-config π
Have a look at https://github.com/weiland/mac-setup to prepare a a mac.
# prepare directory mkdir -p ~/code # clone git clone --branch dotfiles https://github.com/weiland/dotfiles ~/code/dotfiles cd ~/code/dotfiles # link dotfiles (using GNU stow) stow -v -t $HOME fish starship git nvim ssh tmux curl
On installing nix on macOS:
[!NOTE] This information is a bit out of date.
Install Nix:
sh <(curl -L https://nixos.org/nix/install)Add nixos unstable channel:
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nix-channel --update
Also add home-manager:
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager nix-channel --update
Backup nix.conf:
mv /etc/nix/nix.conf /etc/nix/nix.conf.before_nixdarwin
Install homebrew (for nix-darwin) in non-fish shell:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install nix-darwin (https://github.com/LnL7/nix-darwin):
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer ./result/bin/darwin-installer
Then, open a new shell window.
Since we are using a different location for the nix-darwin config, we can remove the ~/.nixpkgs/ directory (with it's darwin-configuration.nix file).
Now, clone nix dotfiles:
git clone https://github.com/weiland/dotfiles.git ~/.config/nixpkgsAnd cd into ~/.config/nixpgs.
Now, verify configurations at darwin-configuration.nix and build the system:
darwin-rebuild switch -I darwin-config=~/.config/nixpkgs/darwin-configuration.nixOpen a new shell window.
We can verify that the config is found via
$ echo $NIX_PATH
The darwin-configuration.nix should be in the ~/.config/nixpkgs/ directory.