diff options
Diffstat (limited to 'modules/darwin/desktop/homebrew.nix')
| -rw-r--r-- | modules/darwin/desktop/homebrew.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/modules/darwin/desktop/homebrew.nix b/modules/darwin/desktop/homebrew.nix new file mode 100644 index 0000000..d1e3649 --- /dev/null +++ b/modules/darwin/desktop/homebrew.nix @@ -0,0 +1,38 @@ +{ + config, + lib, + ... +}: let + cfg = config.getchoo.desktop.homebrew; + inherit (lib) mkDefault mkEnableOption mkIf; +in { + options.getchoo.desktop.homebrew.enable = mkEnableOption "enable homebrew support"; + + config = mkIf cfg.enable { + homebrew = { + enable = mkDefault true; + caskArgs.require_sha = true; + onActivation = mkDefault { + autoUpdate = true; + cleanup = "uninstall"; + upgrade = true; + }; + + casks = let + # thanks @nekowinston :p + skipSha = name: { + inherit name; + args = {require_sha = false;}; + }; + noQuarantine = name: { + inherit name; + args = {no_quarantine = true;}; + }; + in + mkDefault [ + "firefox" + (lib.recursiveUpdate (noQuarantine "chromium") (skipSha "chromium")) + ]; + }; + }; +} |
