modules/homebrew: add onActivation.cleanup "check" mode
Closes #1032 Add `"check"` to the `onActivation.cleanup` enum. When set, nix-darwin runs `brew bundle cleanup` during system checks to detect Homebrew packages that are installed but not present in the generated Brewfile. If extra packages are found, activation fails with a list of them and remediation steps. Unlike `"uninstall"` and `"zap"`, the `"check"` mode never removes packages -- it only reports. This runs during both `darwin-rebuild check` and `darwin-rebuild switch`, matching the behavior of all other system checks.
This commit is contained in:
parent
ca6f8609c3
commit
c68f5d1387
4 changed files with 66 additions and 9 deletions
|
|
@ -83,6 +83,7 @@ in {
|
|||
tests.environment-path = makeTest ./tests/environment-path.nix;
|
||||
tests.environment-terminfo = makeTest ./tests/environment-terminfo.nix;
|
||||
tests.homebrew = makeTest ./tests/homebrew.nix;
|
||||
tests.homebrew-cleanup-check = makeTest ./tests/homebrew-cleanup-check.nix;
|
||||
tests.homebrew-shell-integration = makeTest ./tests/homebrew-shell-integration.nix;
|
||||
tests.launchd-daemons = makeTest ./tests/launchd-daemons.nix;
|
||||
tests.launchd-setenv = makeTest ./tests/launchd-setenv.nix;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue