updated
This commit is contained in:
@@ -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 [ ]);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user