2022-06-19 19:27:52 +00:00
|
|
|
{ config, ... }: {
|
2022-06-14 11:54:18 +00:00
|
|
|
|
2022-06-15 12:14:01 +00:00
|
|
|
homebrew = {
|
|
|
|
enable = true;
|
|
|
|
autoUpdate = false; # Don't update during rebuild
|
|
|
|
cleanup = "zap"; # Uninstall all programs not declared
|
|
|
|
taps = [
|
2022-06-19 19:27:52 +00:00
|
|
|
"homebrew/cask" # Required for casks
|
2022-06-15 12:14:01 +00:00
|
|
|
"homebrew/cask-drivers" # Used for Logitech G-Hub
|
|
|
|
];
|
|
|
|
brews = [
|
|
|
|
"trash" # Delete files and folders to trash instead of rm
|
|
|
|
];
|
|
|
|
casks = [
|
2022-06-18 17:17:11 +00:00
|
|
|
"firefox" # Firefox packaging on Nix is broken for MacOS
|
|
|
|
"1password" # 1Password packaging on Nix is broken for MacOS
|
2022-06-15 12:14:01 +00:00
|
|
|
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
|
|
|
"meetingbar" # Show meetings in menu bar
|
|
|
|
"gitify" # Git notifications in menu bar
|
|
|
|
"logitech-g-hub" # Mouse and keyboard management
|
2022-06-19 19:27:52 +00:00
|
|
|
"mimestream" # Gmail client
|
2022-06-15 12:14:01 +00:00
|
|
|
];
|
|
|
|
global.brewfile = true; # Run brew bundle from anywhere
|
2022-06-19 19:27:52 +00:00
|
|
|
global.noLock = true; # Don't save lockfile (since running from anywhere)
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager.users.${config.user} = {
|
|
|
|
|
|
|
|
home.activation = {
|
|
|
|
|
|
|
|
# Always install homebrew if it doesn't exist
|
|
|
|
installHomeBrew =
|
|
|
|
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
|
|
|
[ "writeBoundary" ] ''
|
|
|
|
if ! xcode-select --version 2>/dev/null; then
|
|
|
|
xcode-select --install
|
|
|
|
fi
|
|
|
|
if ! /usr/local/bin/brew --version 2>/dev/null; then
|
|
|
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2022-06-14 11:54:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|