Nix flake for macOS and Linux via nix-darwin, NixOS, or Home Manager.
You may need to install rosetta and the xcode command-line tools with the following command:
$ softwareupdate --install-rosetta
$ xcode-select --installThen, install nix.
The nix-installer is the most convenient option.
It enables nix-command and flake experimental features by default and provides an uninstaller.
If using the Determinate Systems nix installer, be sure to choose the nixos.org install option.
$ curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install$ ./build.shkeybase pgp export|gpg --import -
keybase pgp export -s|gpg --allow-secret-key-import --import -If you get the following error:
could not write domain com.apple.universalaccess
Open System Preferences -> Security & Privacy -> Full Disk Access.
Find "Terminal" (or whatever terminal emulator you're using) and check the box next to it.
Then retry the darwin-rebuild switch command.
If every build removes the same cask, even if it isn't found, make sure it doesn't come up in brew list.
If it does, there may be a .metadata file left in /opt/homebrew/Caskroom/....
Remove that file, and the build should no longer always remove the same cask.