From 4a4a8b145463ccfef579bb0e26275c97bf0b5bf2 Mon Sep 17 00:00:00 2001 From: bricked Date: Tue, 17 Sep 2024 17:20:22 +0000 Subject: [PATCH] firefox: fix languagepacks policy --- modules/programs/firefox/mkFirefoxModule.nix | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/programs/firefox/mkFirefoxModule.nix b/modules/programs/firefox/mkFirefoxModule.nix index 8475c95a6..7175f6087 100644 --- a/modules/programs/firefox/mkFirefoxModule.nix +++ b/modules/programs/firefox/mkFirefoxModule.nix @@ -813,15 +813,6 @@ in { its example for how to do this. ''; - programs.firefox.policies = { - ExtensionSettings = listToAttrs (map (lang: - nameValuePair "langpack-${lang}@firefox.mozilla.org" { - installation_mode = "normal_installed"; - install_url = - "https://releases.mozilla.org/pub/firefox/releases/${cfg.package.version}/linux-x86_64/xpi/${lang}.xpi"; - }) cfg.languagePacks); - }; - home.packages = lib.optional (cfg.finalPackage != null) cfg.finalPackage; home.file = mkMerge ([{ @@ -1013,6 +1004,17 @@ in { force = true; }; })); - } // setAttrByPath modulePath { finalPackage = wrapPackage cfg.package; }); + } // setAttrByPath modulePath { + finalPackage = wrapPackage cfg.package; + + policies = { + ExtensionSettings = listToAttrs (map (lang: + nameValuePair "langpack-${lang}@firefox.mozilla.org" { + installation_mode = "normal_installed"; + install_url = + "https://releases.mozilla.org/pub/firefox/releases/${cfg.package.version}/linux-x86_64/xpi/${lang}.xpi"; + }) cfg.languagePacks); + }; + }); }