First run xcode-select --install
- Install nix
- Or install brew and run the
macos-setup.sh scriptand skip all nix steps - If brew not found on command line add it to your path:
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
this approach pre-builds nix as your user then only uses sudo to activate as root. This uses the build from the user so root doesn't have to rebuild maximizing cache use.
cd ~/Downloads
curl -o flake.nix https://raw.githubusercontent.com/marvindore/dotfiles/main/dot_config/nix-darwin/flake.nix
nix build ~/Downloads#darwinConfigurations.mchip.system
sudo ./result/sw/bin/darwin-rebuild switch --flake ~/Downloads#mchip
chezmoi init --apply marvindoreuse of sudo is needed for activation(switch) step because nix-darwin needs to configure system-wide settings like /etc defaults, /Applications, and launchd services. This creates your "active system" under /nix/store/.. and sets up the darwin-rebuild links.
# rebuild config
darwin-rebuild switch --flake ~/.config/nix-darwin#mchipthe rebuild usually doesn't need sudo each time unless you update system aliases/defaults.
- website: search.nixos.org
- cli: nix search <repository_from_config> i.e. nix search nixpkgs tmux
Update packages requires two commands
nix flake update #which updates the flake.lock file
#rebuild your config
darwin-rebuild switch --flake ~/.config/nix-darwin#mchip First view list of shells, if bash not listed and you add zsh you might find you can no longer log in as root and bash doesn't work
cat /etc/shells
# add zsh
command -v zsh | sudo tee -a /etc/shells
# now we have told terminal zsh is valid shell login, set as default
sudo chsh -s $(which zsh) $USERSetup Vale on MacOS
cp ~/dotfiles/.config/vale/.vale.ini "~/Library/Application Support/vale/"
~/.local/share/nvim/mason/packages/vale/vale --config="$HOME/Library/Application Support/vale/.vale.ini" syncLinux
vale --config="$HOME/.config/vale/.vale.ini" sync
Install tpm
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
then reload envionment Ctrl-I
dotnet tool install -g dotnet-outdated-tool
dotnet tool install --global dotnet-ef
mkdir -p ~/.config/zellij/plugins/
curl -Lo ~/.config/zellij/plugins/zellij-autolock.wasm https://github.com/fresh2dev/zellij-autolock/releases/download/0.2.2/zellij-autolock.wasm
Disable the mission control keyboard shortcuts for Ctl+left and Ctrl+right
- Drivers: https://github.com/pqrs-org/Karabiner-DriverKit-VirtualHIDDevice
- run daemon:
sudo '/Library/Application Support/org.pqrs/Karabiner-DriverKit-VirtualHIDDevice/Applications/Karabiner-VirtualHIDDevice-Daemon.app/Contents/MacOS/Karabiner-VirtualHIDDevice-Daemon'