$ git clone git@github.com:valbeat/dotfiles.git $HOME/dotfiles
$ cd $HOME/dotfiles
$ make installThis will create symlinks from this repo to your home folder.
Install the packages declared in the Brewfile:
$ make brewAfter installing or removing packages, refresh the Brewfile:
$ make brew-dumpbrew-dump regenerates the whole Brewfile from the current environment.
Redundant built-in taps are stripped automatically, but EOL/deprecated
packages reappear if they are still installed. Review git diff Brewfile
after running it, and use brew uninstall to remove unwanted packages from
the system rather than only deleting their lines here.
macOS system settings are managed declaratively with
nix-darwin. The former .osx
script is migrated to system.defaults (Homebrew is the planned next phase).
This host uses Determinate Nix, so nix-darwin's own Nix management is disabled
(nix.enable = false).
Prerequisites: install Nix (flakes enabled), e.g. the Determinate Systems installer:
$ /bin/sh -c "$(curl --proto '=https' --tlsv1.2 -sSfL https://install.determinate.systems/nix)" -- installThe flake exposes one configuration per host under darwinConfigurations in
flake.nix. Use your host name (scutil --get LocalHostName) in place of
$MY_HOST below; a fork should add a matching entry in flake.nix first.
(HOST is read-only in zsh, so a different variable name is used.)
Activation must run as root. Bootstrap once with nix run, then use
darwin-rebuild for subsequent changes (run from the repository directory so
the . flake reference resolves):
$ MY_HOST=$(scutil --get LocalHostName)
$ sudo nix run nix-darwin -- switch --flake ".#$MY_HOST"
$ sudo darwin-rebuild switch --flake ".#$MY_HOST"Roll back with sudo darwin-rebuild --rollback.
Recent nix-darwin no longer auto-escalates, so activation must run as root
(darwin-rebuild prints system activation must now be run as root otherwise).
The $HOME ... is not owned by you warning printed under sudo is benign —
the flake still evaluates and every setting is applied correctly.
- Fork (https://github.com/valbeat/dotfiles/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the
mainbranch - Create a new Pull Request