My dotfiles.
This is all managed via Nix Flakes, nix-darwin, and Home Manager.
You need to sign in to the App Store:
open -a "App Store"Then install Xcode manually.
Lastly, agree to the Xcode license agreements:
sudo xcodebuild -licenseSome Nix packages are not built for Apple M1 yet and need to be emulated with Rosetta 2.
To install Rosetta 2:
sudo softwareupdate --install-rosetta --agree-to-licenseIf that fails, try:
open '/System/Library/CoreServices/Rosetta 2 Updater.app'Install Nix (multi-user installation recommended):
sh <(curl -L https://nixos.org/nix/install)-
Clone this repository:
mkdir -p ~/src git clone https://github.com/steinybot/dotfiles.git ~/src/dotfiles cd ~/src/dotfiles
-
Build and Apply the configuration:
nix build --extra-experimental-features "nix-command flakes" .#darwinConfigurations.goodness.system ./result/sw/bin/darwin-rebuild switch --flake .
To pull in updates from this repository and apply them:
cd ~/src/dotfiles
git pull
darwin-rebuild switch --flake .home-update: Rebuilds the system configuration from~/src/dotfiles.
This command runs: darwin-rebuild switch --flake ~/src/dotfiles
Note: You will see a "Git tree is dirty" warning if you have uncommitted changes. This is normal and serves as a helpful reminder.
If the build fails, check the logs. Common issues include deprecated options or failing package builds.
You can inspect the build log by redirecting output:
nix build .#darwinConfigurations.goodness.system > build.log 2>&1If you need to bootstrap from scratch, you can use the nix-bootstrap alias or run the bootstrap script manually (see bootstrap.sh in the repo history or steinybot/bootstrap repo).