dotfiles/INSTALL_MACOS.md
2022-03-10 12:21:37 +00:00

45 lines
857 B
Markdown

## Nix
sh <(curl -L https://nixos.org/nix/install)
Add
```
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix
``` to `/etc/zshrc`
[restart]
## nix-darwin
nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
add
```
services.nix-daemon.enable = true;
nix = {
useDaemon = true;
gc.automatic = true;
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
``` to `~/.nixpkgs/darwin-configuration.nix
./result/bin/darwin-installer
darwin-rebuild switch
[restart]
add
```
experimental-features = nix-command flakes
``` to `/etc/nix/nix.conf`
## home-manager
nix build .#darwinConfigurations.macmini.system
darwin-rebuild build --flake '.