mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-02 11:39:20 +00:00
firefox: set non-default configPath on darwin
On macOS 27+, wrapped package will have no Mozilla signature and will fail to access the default datadir. Move users with recent stateVersion to a non-default datadir recommended by: https://github.com/NixOS/nixpkgs/pull/556611 Users with existing profiles under default datadir will have to migrate them to a different location on macOS 27 upgrade. Migrating existing directory is out of scope for Home Manager.
This commit is contained in:
committed by
Austin Horstman
parent
922a645e84
commit
c41f8b81d1
@@ -93,6 +93,17 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
warnings = lib.optional linuxConfigPathStateVersion.shouldWarn linuxConfigPathStateVersion.warning;
|
||||
|
||||
# On macOS 27+, Firefox builds not signed by Mozilla cannot access the
|
||||
# traditional data directory. Use org.nixos.firefox directory instead.
|
||||
# When package is null, we don't know if it's a signed version (e.g.
|
||||
# firefox-bin-unwrapped or from Homebrew) or not, so we leave it up to the
|
||||
# user to adjust as needed.
|
||||
programs.firefox.configPath = lib.mkIf (
|
||||
pkgs.stdenv.hostPlatform.isDarwin
|
||||
&& cfg.package != null
|
||||
&& lib.versionAtLeast config.home.stateVersion "26.11"
|
||||
) (lib.mkDefault "Library/Application Support/org.nixos.firefox");
|
||||
|
||||
mozilla.firefoxNativeMessagingHosts =
|
||||
cfg.nativeMessagingHosts
|
||||
# package configured native messaging hosts (entire browser actually)
|
||||
|
||||
Reference in New Issue
Block a user