Skip to content

mbarneyjr/system.nix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

446 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

system.nix

Nix flake for macOS and Linux via nix-darwin, NixOS, or Home Manager.

Darwin Requirements

You may need to install rosetta and the xcode command-line tools with the following command:

softwareupdate --install-rosetta
xcode-select --install

Then, install nix.

sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)

Running

First-Time Setup

Clone:

nix run --extra-experimental-features 'nix-command flakes' nixpkgs#git clone https://github.com/mbarneyjr/system.nix ~/system.nix

Move login files for nix-darwin:

sudo mv /etc/bashrc /etc/bashrc.before-nix-darwin
sudo mv /etc/zshrc /etc/zshrc.before-nix-darwin

Build

./build.sh

Post-Setup

Keybase GPG

First, login:

keybase login

Then, import the keys:

keybase pgp export|gpg --import -
keybase pgp export -s|gpg --allow-secret-key-import --import -

Troubleshooting

com.apple.universalaccess

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.

Brew bundle always removing the same cask

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.

About

Nix, nix-darwin, home manager setup for my development environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors