This commit is contained in:
Morten Olsen
2025-12-27 00:02:02 +01:00
parent e384cc4829
commit 7f087bc39e
16 changed files with 257 additions and 213 deletions

View File

@@ -9,9 +9,11 @@
pkgs,
...
}:
with lib; let
with lib;
let
cfg = config.modules.homebrew;
in {
in
{
options.modules.homebrew = {
enable = mkEnableOption "Homebrew management via nix-darwin";
@@ -127,7 +129,11 @@ in {
# Cleanup behavior
cleanup = mkOption {
type = types.enum ["none" "uninstall" "zap"];
type = types.enum [
"none"
"uninstall"
"zap"
];
default = "zap";
description = ''
Cleanup behavior for Homebrew packages:
@@ -150,7 +156,7 @@ in {
# Upgrade outdated packages
upgrade = true;
# Cleanup behavior for unmanaged packages
cleanup = cfg.cleanup;
inherit (cfg) cleanup;
};
# Global settings
@@ -162,26 +168,18 @@ in {
};
# Taps (third-party repositories)
taps = cfg.taps;
inherit (cfg) taps;
# Formulae (CLI tools from Homebrew)
brews = cfg.brews;
inherit (cfg) brews;
caskArgs.no_quarantine = true;
# Casks (GUI applications)
casks =
cfg.casks.shared
++ (
if cfg.casks.enablePersonal
then cfg.casks.personal
else []
)
++ (
if cfg.casks.enableWork
then cfg.casks.work
else []
);
++ (if cfg.casks.enablePersonal then cfg.casks.personal else [ ])
++ (if cfg.casks.enableWork then cfg.casks.work else [ ]);
};
};
}