fix(darwin): use stable app path to prevent installs.ini accumulation#150
Merged
luisnquin merged 5 commits into0xc000022070:mainfrom Nov 5, 2025
Merged
Conversation
Previously, policies.json was only installed for Linux builds, causing browser policies (including ExtensionSettings) to be ignored on macOS. This resulted in extensions not being automatically installed on macOS systems. This fix adds the policies.json installation to the Darwin install phase, mirroring the Linux behavior and ensuring policy enforcement works correctly on macOS. Fixes extension auto-installation and other policy-based features on macOS.
Problem: - Zen Browser creates install IDs based on the application path - Wrapper script uses Nix store path which changes on every rebuild - Each new path creates a new install ID entry in installs.ini - Results in: multiple Dock icons, empty profiles, data loss Solution: - Use the stable Home Manager symlink path (~/.../Home Manager Apps/...) - This path remains constant across Nix rebuilds - Zen Browser sees the same path every time, reuses existing install ID - Falls back to store path if symlink doesn't exist yet Benefits: - No activation scripts or workarounds needed - Fixes root cause instead of symptoms - Maintains profile continuity naturally - Clean, elegant solution
Problem: - SQLite WAL mode writes changes to .sqlite-wal file first - Changes aren't visible until WAL is checkpointed to main file - Zen Browser reads stale data from main file on startup - User needs to wait or manually trigger checkpoint to see updates Solution: - Execute PRAGMA wal_checkpoint(FULL) after all updates - Forces immediate merge of WAL changes to main database file - Ensures spaces/pins updates are visible on next Zen startup This fixes the delay between home-manager rebuild and seeing configuration changes in Zen Browser.
Problem: - AdGuard recognizes apps by code signing identifier, not CFBundleIdentifier - Nix's adhoc re-signing changes identifier from 'app.zen-browser.zen' to 'zen' - This breaks AdGuard's app filtering for Nix-built Zen Browser Solution: - Explicitly set --identifier flag when re-signing with codesign - Maintains 'app.zen-browser.zen' identifier for AdGuard compatibility - Ensures proper ad-blocking and app recognition This allows AdGuard and other security tools to correctly identify Zen Browser even when built through Nix.
luisnquin
approved these changes
Nov 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
Solution:
Benefits: