Nix install
1. Run Nix install
with fish
sh (curl -L https://nixos.org/nix/install | psub) --darwin-use-unencrypted-nix-store-volume
for zsh with multi user
sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
2. Install foreign-env for Fish
omf install foreign-env
3. Add to config.fish
file
echo "fenv source $HOME/.nix-profile/etc/profile.d/nix.sh" >> ~/.config/fish/config.fish
4. Install nix-darwin
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
./result/bin/darwin-installer
5. Add to PATH
echo "set -U fish_user_paths $fish_user_paths /run/current-system/sw/bin" >> ~/.config/fish/config.fish
6. Install home-manager
nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager
nix-channel --update
nix-shell '<home-manager>' -A install
Results:
~/.nixpkgs/darwin-configuration.nix
- `~/.config/nixpkgs/home.nix
Need to source
. /Users/ethan/.nix-profile/etc/profile.d/nix.sh