This is my personal M2 Max Macbook, running MacOS and using nix-darwin and home-manager to manage things.
# ensure nix is installed, repo is cloned to ~/cfg
# initial switch. after this, you can use just `hms` to update!
$(nix build --no-link --print-out-paths --extra-experimental-features nix-command --extra-experimental-features flakes ~/cfg#hmx.pluto)/bin/switch
curl https://raw.githubusercontent.com/jpetrucciani/nix/main/scripts/files/com.startup.sysctl.plist |
sudo tee /Library/LaunchDaemons/com.startup.sysctl.plist
sudo chown root:wheel /Library/LaunchDaemons/com.startup.sysctl.plist
sudo launchctl load /Library/LaunchDaemons/com.startup.sysctl.plist
# before first switch
sudo spctl --master-disable
# after switch
sudo spctl --master-enable
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
This file defines the OS configuration for the pluto
machine.