1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-12-04 18:56:56 +01:00
config/modules/darwin/homebrew.nix

34 lines
693 B
Nix

{
homebrew-core,
homebrew-cask,
steipete-tap,
config,
lib,
...
}:
{
homebrew = {
enable = true;
};
nix-homebrew = {
enable = true;
user = config.system.primaryUser;
taps."homebrew/homebrew-core" = homebrew-core;
taps."homebrew/homebrew-cask" = homebrew-cask;
taps."steipete/tap" = steipete-tap;
mutableTaps = true;
};
system.activationScripts.preActivation.text = lib.mkAfter ''
if [[ -L /opt/homebrew/Library/Taps ]]; then
rm -f /opt/homebrew/Library/Taps
fi
mkdir -p /opt/homebrew/Library/Taps
chown ${config.system.primaryUser}:admin /opt/homebrew/Library/Taps
chmod ug=rwx /opt/homebrew/Library/Taps
'';
}