summaryrefslogtreecommitdiff
path: root/modules/darwin/desktop/homebrew.nix
blob: 2371f57331ad0ccbbdb3a6bf3f00b09b1bc733c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ config, lib, ... }:
let
  cfg = config.desktop.homebrew;
  enable = config.desktop.enable && cfg.enable;
in
{
  options.desktop.homebrew = {
    enable = lib.mkEnableOption "Homebrew integration" // {
      default = true;
    };
  };

  config = lib.mkIf enable {
    homebrew = {
      enable = true;

      onActivation = lib.mkDefault {
        autoUpdate = true;
        cleanup = "zap";
        upgrade = true;
      };

      caskArgs = {
        no_quarantine = true;
        require_sha = false;
      };
    };
  };
}