From e24f808b63fe01633248dc85b0d86d07b1e4814e Mon Sep 17 00:00:00 2001 From: alexion Date: Fri, 24 Jul 2026 08:25:04 -0400 Subject: [PATCH] fix(firefox): take ownership of profiles.ini so the profile deploys (task 0032) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Firefox writes ~/.config/mozilla/firefox/profiles.ini itself on first launch, pointing at an auto-created random-prefix profile. Home-manager then refuses to clobber that file and fails the whole activation, so the declarative default profile — search.json.mozlz4 (DuckDuckGo) and the Stylix user.js — never lands and Firefox keeps running the stale profile with Google as default and no theme. Set force = true on the generated profiles.ini home.file entry so home-manager owns it, deploys the default profile, and Firefox switches to it. --- modules/desktop/firefox.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/desktop/firefox.nix b/modules/desktop/firefox.nix index 42db1a6..6ce4431 100644 --- a/modules/desktop/firefox.nix +++ b/modules/desktop/firefox.nix @@ -15,7 +15,7 @@ in options.modules.desktop.firefox.enable = lib.mkEnableOption "Firefox as the desktop browser"; config = lib.mkIf cfg.enable { - home-manager.users.${user} = { + home-manager.users.${user} = hm: { programs.firefox = { enable = true; @@ -90,6 +90,10 @@ in "x-scheme-handler/https" = "firefox.desktop"; }; }; + + # Firefox writes profiles.ini itself on first launch, so home-manager is + # told to own the file rather than fail activation refusing to clobber it. + home.file."${hm.config.programs.firefox.configPath}/profiles.ini".force = true; }; }; }