dotfiles/modules/darwin/homebrew.nix

54 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2024-04-20 09:42:06 -04:00
{
config,
pkgs,
lib,
...
}:
{
2022-06-14 07:54:18 -04:00
2022-06-19 23:44:29 -04:00
# Homebrew - Mac-specific packages that aren't in Nix
2022-12-21 14:18:03 -07:00
config = lib.mkIf pkgs.stdenv.isDarwin {
2022-06-20 15:49:25 -04:00
2022-12-21 14:18:03 -07:00
# Requires Homebrew to be installed
system.activationScripts.preUserActivation.text = ''
if ! xcode-select --version 2>/dev/null; then
$DRY_RUN_CMD xcode-select --install
fi
if ! /opt/homebrew/bin/brew --version 2>/dev/null; then
2022-12-21 14:18:03 -07:00
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
'';
2024-01-25 14:57:18 -05:00
# Add homebrew paths to CLI path
2024-04-20 09:42:06 -04:00
home-manager.users.${config.user}.home.sessionPath = [ "/opt/homebrew/bin/" ];
2024-01-25 14:57:18 -05:00
2022-12-21 14:18:03 -07:00
homebrew = {
enable = true;
onActivation = {
autoUpdate = false; # Don't update during rebuild
cleanup = "zap"; # Uninstall all programs not declared
upgrade = true;
};
global = {
brewfile = true; # Run brew bundle from anywhere
lockfiles = false; # Don't save lockfile (since running from anywhere)
};
brews = [
"trash" # Delete files and folders to trash instead of rm
];
casks = [
2024-01-24 21:52:33 -05:00
"1password" # 1Password will not launch from Nix on macOS
2024-01-25 07:55:31 -05:00
# "gitify" # Git notifications in menu bar (downgrade manually from 4.6.1)
2023-04-08 12:26:14 -04:00
"keybase" # GUI on Nix not available for macOS
2024-01-24 11:02:06 -05:00
# "logitech-g-hub" # Mouse and keyboard management
"logitune" # Logitech webcam firmware
2023-04-08 12:26:14 -04:00
"meetingbar" # Show meetings in menu bar
"scroll-reverser" # Different scroll style for mouse vs. trackpad
"notunes" # Don't launch Apple Music with the play button
"steam" # Not packaged for Nixon macOS
2025-01-06 15:45:25 -05:00
"epic-games" # Not packaged for Nix
2022-12-21 14:18:03 -07:00
];
};
2022-06-14 07:54:18 -04:00
};
}