dotfiles.nix/darwin/homebrew.nix

92 lines
1.9 KiB
Nix

{ flake, config, ... }:
{
environment.variables.HOMEBREW_NO_ANALYTICS = "1";
programs.fish = {
shellInit = ''
eval "$(${config.homebrew.brewPrefix}/brew shellenv fish)"
'';
# https://docs.brew.sh/Shell-Completion#configuring-completions-in-fish
# for some reason if the Fish completions are added at the end of `fish_complete_path` they don't
# seem to work, but they do work if added at the start.
interactiveShellInit = ''
if test -d (brew --prefix)"/share/fish/completions"
set -p fish_complete_path (brew --prefix)/share/fish/completions
end
if test -d (brew --prefix)"/share/fish/vendor_completions.d"
set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d
end
'';
};
homebrew = {
enable = flake.inputs.homebrew-enabled.value;
onActivation = {
autoUpdate = true;
upgrade = true;
cleanup = "uninstall";
};
global.brewfile = true;
taps = [
"homebrew/cask-versions"
"homebrew/services"
"indirect/homebrew-tap" # ghostty formula
];
masApps = {
Amphetamine = 937984704;
"Draw Things" = 6444050820;
GrandPerspective = 1111570163;
Omnivore = 1564031042;
Tailscale = 1475387142;
Things = 904280696;
Xcode = 497799835;
};
caskArgs.no_quarantine = true;
casks = [
# system tools
"alfred"
"dozer"
"knockknock"
"lulu"
"protonvpn"
"rectangle"
"secretive"
"shortcat"
"stay"
"utm"
# design
"imageoptim"
"krita"
"macsvg"
# browsers
"arc"
"firefox"
"orion"
# messaging apps
"discord"
"messenger"
"signal"
"slack"
"zoom"
# editors and IDEs
"lapce"
"zed"
# terminal emulators
"ghostty"
"kitty"
# peripheral tools
"logi-options-plus"
"qflipper"
"via"
];
};
}