From e6b7632401f66e4f34322610ebd607a00d9a2080 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Wed, 21 Oct 2026 17:48:46 +0200 Subject: [PATCH] darwin/homebrew: clean up dangling Taps symlink during activation --- modules/darwin/homebrew.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/darwin/homebrew.nix b/modules/darwin/homebrew.nix index 252a08f..a894e69 100644 --- a/modules/darwin/homebrew.nix +++ b/modules/darwin/homebrew.nix @@ -3,6 +3,7 @@ homebrew-cask, steipete-tap, config, + lib, ... }: { @@ -21,4 +22,13 @@ 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 + ''; }