If you're looking for the Nix-based system configuration, you want ascander/dots
This is a Nix-free version of my personal development environment for macOS machines. This includes:
- Homebrew for applications, packages, fonts, etc.
- Configuration for the tools I use (symlinked by rcm) including:
- Alacritty
- Tmux
- Karabiner Elements
- ZSH
Do the following to set up a new macOS machine:
-
Run the bootstrap script
./bin/bootstrap.sh
-
Install packages from the Brewfile
brew bundle --file ./Brewfile
-
Install
rcmconfiguration filercup -d . rcrc -
Install dotfiles
rcup
-
Set up macOS defaults
./bin/defaults.sh
I'm trying out LazyVim as an editor instead of a Nix-based configuration. You can find it at ascander/nvim
I've included a number of Alacritty themes in config/alacritty/themes as well as a theme switcher script in bin/switchtheme.sh. You can switch to eg. nightfox as follows:
./bin/switchtheme.sh nightfoxSetting up GPG for signed commits to Github requires Homebrew dependencies to be installed, viz. gnupg and pinentry-mac. I currently set this up manually, following this gist.
My convention for local configuration (ie., packages and/or configuration you need on a work computer) is to use file(s) ending in .local including:
Brewfile.localfor Homebrew packageszshrc.localfor ZSH settings/env/etc.
If you want to define a mapping in Karabiner to do different things based on whether the key is pressed alone or with another key, use this structure:
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}Using to_when_held_down instead of to results in having to tweak delay thresholds to tune when eg. Esc is sent vs. Ctrl, and I haven't been able to get it just right for how I type.