nix/darwin/homebrew.nix
2025-04-08 23:37:00 -05:00

167 lines
3.9 KiB
Nix

{
config,
lib,
pkgs,
user,
inputs,
...
}:
{
options.custom.brew = with lib; {
zen-browser = mkEnableOption "Enable Zen Browser";
webex = mkEnableOption "Enable Webe";
zoom = mkEnableOption "Enable Zoom";
slack = mkEnableOption "Enable Slack";
ghostty = mkEnableOption "Enable Ghostty";
ms-office = mkEnableOption "Enable MS Office";
ms-teams = mkEnableOption "Enable MS Teams";
spotify = mkEnableOption "Enable Spotify";
raycast = mkEnableOption "Enable Raycast";
whatsapp = mkEnableOption "Enable Whatsapp";
vscode = mkEnableOption "Enable VSCode";
firefox = mkEnableOption "Enable Firefox";
chromium = mkEnableOption "Enable Chromium";
aldente = mkEnableOption "Enable AlDente";
zotero = mkEnableOption "Enable Zotero";
amphetamine = mkEnableOption "Enable Amphetamine";
scroll-reverser = mkEnableOption "Enable Scroll Reverser";
ice = mkEnableOption "Enable Ice Menu Manager";
contexts = mkEnableOption "Enable Contexts";
forklift = mkEnableOption "Enable Forklift 4";
flux = mkEnableOption "Enable f.lux";
};
config = lib.mkMerge [
{
nix-homebrew = {
inherit user;
enable = true;
enableRosetta = true;
taps = {
"homebrew/homebrew-core" = inputs.homebrew-core;
"homebrew/homebrew-cask" = inputs.homebrew-cask;
"homebrew/homebrew-createzap" = inputs.homebrew-createzap;
};
mutableTaps = false;
};
homebrew = {
enable = true;
onActivation = {
# autoUpdate = true;
cleanup = "zap";
};
global = {
brewfile = true;
};
};
}
# mas apps
(lib.mkIf config.custom.brew.amphetamine {
homebrew.masApps = {
"Amphetamine" = 937984704;
};
})
# casks
(lib.mkIf config.custom.brew.zen-browser {
homebrew.casks = [
"zen-browser"
];
})
(lib.mkIf config.custom.brew.webex {
homebrew.casks = [
"webex"
];
})
(lib.mkIf config.custom.brew.slack {
homebrew.casks = [
"slack"
];
})
(lib.mkIf config.custom.brew.zoom {
homebrew.casks = [
"zoom"
];
})
(lib.mkIf config.custom.brew.spotify {
homebrew.casks = [
"spotify"
];
})
(lib.mkIf config.custom.brew.ghostty {
homebrew.casks = [
"ghostty"
];
})
(lib.mkIf config.custom.brew.ms-office {
homebrew.casks = [
"microsoft-office"
];
})
(lib.mkIf config.custom.brew.ms-teams {
homebrew.casks = [
"microsoft-teams"
];
})
(lib.mkIf config.custom.brew.raycast {
homebrew.casks = [
"raycast"
];
})
(lib.mkIf config.custom.brew.whatsapp {
homebrew.casks = [
"whatsapp"
];
})
(lib.mkIf config.custom.brew.vscode {
homebrew.casks = [
"visual-studio-code"
];
})
(lib.mkIf config.custom.brew.firefox {
homebrew.casks = [
"firefox"
];
})
(lib.mkIf config.custom.brew.chromium {
homebrew.casks = [
"chromium"
];
})
(lib.mkIf config.custom.brew.aldente {
homebrew.casks = [
"aldente"
];
})
(lib.mkIf config.custom.brew.zotero {
homebrew.casks = [
"zotero"
];
})
(lib.mkIf config.custom.brew.scroll-reverser {
homebrew.casks = [
"scroll-reverser"
];
})
(lib.mkIf config.custom.brew.ice {
homebrew.casks = [
"jordanbaird-ice"
];
})
(lib.mkIf config.custom.brew.contexts {
homebrew.casks = [
"contexts"
];
})
(lib.mkIf config.custom.brew.forklift {
homebrew.casks = [
"forklift"
];
})
(lib.mkIf config.custom.brew.flux {
homebrew.casks = [
"flux"
];
})
];
}