Manage macOS using Nix, nix-darwin and Home Manager.
Set hostname to a known (configured) value:
- m1-mpb
- macos-virtual
Install Nix:
sh <(curl -L https://nixos.org/nix/install) --daemon
Install command line tools for git (brute force):
xcode-select --install
Give Terminal.app "Full Disk Access" in System Preferences > Privacy & Security > Privacy > Full Disk Access. This is required for some of the I've disabled this for now.nix-darwin
system settings to apply successfully.
Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Clone system-config
mkdir -p ~/dev/src
cd ~/dev/src
git clone https://github.com/johnallen3d/system-config.git
cd system-config
Install nix-darwin
and initial apply:
nix \
--extra-experimental-features "flakes nix-command" \
run nix-darwin \
-- switch --flake ~/dev/src/system-config
# on macOS
set -xg NIXPKGS_ALLOW_UNFREE 1; darwin-rebuild switch --impure --flake ~/dev/src/system-config/
# on NixOS
sudo nixos-rebuild switch --flake ~/dev/src/system-config/.# --impure
nix flake update --commit-lock-file
# or from another directory
pushd ~/dev/src/system-config; nix flake update --commit-lock-file; nixswitch; popd
Things I'm not sure how to automate yet:
- creation of
~/bin/bottombar
(link tosketchybar
)
ln -s (which sketchybar) $HOME/bin/bottombar
- set the users default shell to
fish
chsh -s /run/current-system/sw/bin/fish
- setup
op
, login andgh
plugin - can I add
$HOME
to Finder Favorites (sidebar)? - this seems to be stored in a binary file [here](~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.FavoriteItems.sfl3): - can I add "login items"? - possibly via plist files?
- debug lsd fonts
- debug services (bars, mpd)
- debug Neovim setup
- automate install of SketchyBar Lua Plugin
- Music?
- Photos?
- how to correctly set "allow unfree" specifically for
tart