2024-11-25 15:47:08 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
inputs,
|
|
|
|
...
|
|
|
|
}:
|
2024-11-25 15:41:54 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
with lib.metacfg;
|
|
|
|
let
|
|
|
|
cfg = config.metacfg.system.fonts;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [ inputs.nix-homebrew.darwinModules.nix-homebrew ];
|
|
|
|
|
|
|
|
options.metacfg.system.homebrew = with types; {
|
|
|
|
enable = mkBoolOpt false "Whether or not to enable homebrew";
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
nix-homebrew = {
|
|
|
|
# Install Homebrew under the default prefix
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
# Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2
|
|
|
|
enableRosetta = false;
|
|
|
|
|
|
|
|
# User owning the Homebrew prefix
|
|
|
|
user = "harald";
|
|
|
|
|
|
|
|
# Optional: Declarative tap management
|
|
|
|
taps = {
|
|
|
|
"homebrew/homebrew-core" = inputs.homebrew-core;
|
|
|
|
"homebrew/homebrew-cask" = inputs.homebrew-cask;
|
|
|
|
"homebrew/homebrew-bundle" = inputs.homebrew-bundle;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Optional: Enable fully-declarative tap management
|
|
|
|
#
|
|
|
|
# With mutableTaps disabled, taps can no longer be added imperatively with `brew tap`.
|
|
|
|
mutableTaps = false;
|
|
|
|
};
|
2024-11-25 16:00:27 +01:00
|
|
|
programs.fish.shellInit = ''
|
|
|
|
/opt/homebrew/bin/brew shellenv | source
|
|
|
|
'';
|
2024-11-25 15:41:54 +01:00
|
|
|
};
|
|
|
|
}
|