diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix index 1370d4c28f0d..950f322ef93b 100644 --- a/modules/programs/firefox.nix +++ b/modules/programs/firefox.nix @@ -10,13 +10,21 @@ let jsonFormat = pkgs.formats.json { }; + isLibrewolf = cfg.package.meta.mainProgram == "librewolf"; + mozillaConfigPath = - if isDarwin then "Library/Application Support/Mozilla" else ".mozilla"; + if isLibrewolf then + (if isDarwin then "Library/Application Support/Librewolf" else ".librewolf") + else + (if isDarwin then "Library/Application Support/Mozilla" else ".mozilla"); - firefoxConfigPath = if isDarwin then - "Library/Application Support/Firefox" + firefoxConfigPath = if isLibrewolf then + mozillaConfigPath else - "${mozillaConfigPath}/firefox"; + (if isDarwin then + "Library/Application Support/Firefox" + else + "${mozillaConfigPath}/firefox"); profilesPath = if isDarwin then "${firefoxConfigPath}/Profiles" else firefoxConfigPath;