Configure declarative tap management
mainYou can manage Homebrew taps declaratively using the taps attribute.
Important Naming Rule: In Homebrew, tap repository names must have homebrew- prepended. When declaring taps in nix-homebrew.taps, ensure the key is the unique folder name starting with homebrew- (e.g., user/homebrew-repo).
Strict Mode: If you set mutableTaps = false, taps can no longer be added imperatively via brew tap. They can only be managed by updating your Nix configuration. To remove a tap in this mode, delete its attribute from nix-homebrew.taps and re-activate the configuration.
To avoid configuration mismatches between nix-homebrew and nix-darwin, it is recommended to align homebrew.taps with the names used in nix-homebrew.taps.
nix-homebrew = {
enable = true;
taps = {
"homebrew/homebrew-core" = homebrew-core;
"homebrew/homebrew-cask" = homebrew-cask;
};
mutableTaps = false;
};
# Align homebrew taps config with nix-homebrew
({config, ...}: {
homebrew.taps = builtins.attrNames config.nix-homebrew.taps;
})