Commit 21a7276
authored
fix(darwin): use stable app path to prevent installs.ini accumulation (#150)
* fix: Add policies.json support for macOS (Darwin)
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.
* fix(darwin): use stable app path to prevent installs.ini accumulation
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
* fix: force WAL checkpoint after updating places.sqlite
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.
* fix(darwin): preserve correct bundle identifier in code signature
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.1 parent e03039c commit 21a7276
2 files changed
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
615 | 618 | | |
616 | 619 | | |
617 | 620 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
74 | 82 | | |
75 | 83 | | |
76 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
77 | 92 | | |
78 | 93 | | |
79 | 94 | | |
| |||
0 commit comments