From 1da3ca73732263dc0473f0d64ccdfa810eaa1fac Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 27 May 2026 13:15:06 +0300 Subject: [PATCH] firefox/wrapper: better way to disable update checks See https://bugzilla.mozilla.org/show_bug.cgi?id=2042197 --- .../networking/browsers/firefox/wrapper.nix | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 0d2cd7bdf46e..e05899ae0e8d 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -166,36 +166,34 @@ let ) (lib.optionals usesNixExtensions nixExtensions); enterprisePolicies = { - policies = { - DisableAppUpdate = true; - } - // lib.optionalAttrs usesNixExtensions { - ExtensionSettings = { - "*" = { - blocked_install_message = "You can't have manual extension mixed with nix extensions"; - installation_mode = "blocked"; - }; - } - // lib.foldr ( - e: ret: - ret - // { - "${e.extid}" = { - installation_mode = "allowed"; + policies = + lib.optionalAttrs usesNixExtensions { + ExtensionSettings = { + "*" = { + blocked_install_message = "You can't have manual extension mixed with nix extensions"; + installation_mode = "blocked"; }; } - ) { } extensions; + // lib.foldr ( + e: ret: + ret + // { + "${e.extid}" = { + installation_mode = "allowed"; + }; + } + ) { } extensions; - Extensions = { - Install = lib.foldr (e: ret: ret ++ [ "${e.outPath}/${e.extid}.xpi" ]) [ ] extensions; - }; - } - // lib.optionalAttrs smartcardSupport { - SecurityDevices = { - "OpenSC PKCS#11 Module" = "opensc-pkcs11.so"; - }; - } - // extraPolicies; + Extensions = { + Install = lib.foldr (e: ret: ret ++ [ "${e.outPath}/${e.extid}.xpi" ]) [ ] extensions; + }; + } + // lib.optionalAttrs smartcardSupport { + SecurityDevices = { + "OpenSC PKCS#11 Module" = "opensc-pkcs11.so"; + }; + } + // extraPolicies; }; mozillaCfg = '' @@ -414,6 +412,9 @@ let ln -sfT "$target" "$out/$l" done + # Disable update checks + touch $out/${libDir}/is-packaged-app + cd "$out" ''