From 9934332f70b51640878fff8c0e7852532f069996 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 23 Jul 2023 22:20:29 -0400 Subject: modules/darwin: init desktop module --- modules/darwin/desktop/homebrew.nix | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 modules/darwin/desktop/homebrew.nix (limited to 'modules/darwin/desktop/homebrew.nix') 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")) + ]; + }; + }; +} -- cgit v1.2.3