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.
sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)Clone:
nix run --extra-experimental-features 'nix-command flakes' nixpkgs#git clone https://github.com/mbarneyjr/system.nix ~/system.nixMove login files for nix-darwin:
sudo mv /etc/bashrc /etc/bashrc.before-nix-darwin
sudo mv /etc/zshrc /etc/zshrc.before-nix-darwin./build.shFirst, login:
keybase loginThen, import the keys:
keybase 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.