dotfiles/modules/darwin/homebrew.nix

53 lines
1.8 KiB
Nix
Raw Normal View History

2022-12-21 21:18:03 +00:00
{ config, pkgs, lib, ... }: {
2022-06-14 11:54:18 +00:00
2022-06-20 03:44:29 +00:00
# Homebrew - Mac-specific packages that aren't in Nix
2022-12-21 21:18:03 +00:00
config = lib.mkIf pkgs.stdenv.isDarwin {
2022-06-20 19:49:25 +00:00
2022-12-21 21:18:03 +00: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 ! /usr/local/bin/brew --version 2>/dev/null; then
$DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
'';
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)
};
taps = [
"homebrew/cask" # Required for casks
"homebrew/cask-drivers" # Used for Logitech G-Hub
];
brews = [
"trash" # Delete files and folders to trash instead of rm
"openjdk" # Required by Apache Directory Studio
];
casks = [
"1password" # 1Password packaging on Nix is broken for macOS
2023-04-08 16:26:14 +00:00
"apache-directory-studio" # Packaging on Nix is not available for macOS
2022-12-21 21:18:03 +00:00
"gitify" # Git notifications in menu bar
2023-04-08 16:26:14 +00:00
"keybase" # GUI on Nix not available for macOS
2022-12-21 21:18:03 +00:00
"logitech-g-hub" # Mouse and keyboard management
"logitune" # Logitech webcam firmware
2023-04-08 16:26:14 +00:00
"meetingbar" # Show meetings in menu bar
2022-12-21 21:18:03 +00:00
"obsidian" # Obsidian packaging on Nix is not available for macOS
2023-04-08 16:26:14 +00:00
"scroll-reverser" # Different scroll style for mouse vs. trackpad
2022-12-21 21:18:03 +00:00
"steam" # Not packaged for Nix
2023-08-19 16:49:54 +00:00
"epic-games" # Not packaged for Nix
2022-12-21 21:18:03 +00:00
];
};
2022-06-14 11:54:18 +00:00
};
}