Uses:
- Nix for dotfiles, CLI tool and general system config, via:
- Homebrew for GUI apps
- Chezmoi for private or host-specific config
Note
At one point these were automated, but they only need to be done once when setting up a new computer, and frequently change with the OS version, so it's easier to just do them manually
Now run:
# Assuming that $PWD is this repo
$ sudo nix run .#rebuild -- switch --flake $PWD#<hostname>
# if that doesn't work, try:
$ sudo nix run --inputs-from $PWD nix-darwin#darwin-rebuild -- switch --flake $PWD#<hostname>Next steps:
- Create SSH key (see GH's docs for current recommendation):
- Remap Caps Lock to Ctrl on all keyboards (via System Settings)
# Set computer name
$ read '?Hostname: ' name; for var in ComputerName HostName LocalHostName; do sudo scutil --set "$var" "$name"; done
# Set default location for `darwin-rebuild` `--flake` option
$ sudo ln -ivs ~/src/dotfiles/flake.nix /etc/nix-darwin/flake.nix
# Setup Chezmoi
$ ln -ivs ~/src/dotfiles ~/.local/share/chezmoi
$ mkdir -p ~/.config/chezmoi
$ ln -ivs ~/src/dotfiles/hosts/chezmoi/$(hostname).toml ~/.config/chezmoi/chezmoi.toml
# Run Chezmoi
$ chezmoi diff
# (check output, then)
$ chezmoi apply