From 8fce018efdf36eb72c1c36d02a5933d24d26c8d5 Mon Sep 17 00:00:00 2001 From: whispers Date: Wed, 27 May 2026 10:16:04 -0400 Subject: [PATCH 1/2] tor-browser: remove unnecessary auto-update policies This came up in Firefox as https://bugzilla.mozilla.org/show_bug.cgi?id=2042197, where policies caused different behavior to be active (also see https://github.com/NixOS/nixpkgs/pull/524793). We should not observe any such differences, but this indicates that the policy is unnecessary for disabling the updater. Tor/Mullvad Browser have supported is-packaged-app for a long time (https://gitlab.torproject.org/tpo/applications/tor-browser/-/merge_requests/985), and it's preferred by Firefox (i.e. it actually has meaning there: https://searchfox.org/firefox-main/search?q=is-packaged-app&path=&case=false®exp=false), so we switch from `system-install` to that one. This shouldn't change anything else user visible. This removes the "Your browser is being managed by your organization." text from about:preferences and changes about:policies from showing this singular policy to "The Enterprise Policies service is inactive." (the intended upstream behavior), so this seems like a win for clarity. Tested by downgrading the version in the derivation, and seeing no update UI appear, either in the hamburger menu in the toolbar or under Help > About Tor Browser. --- pkgs/by-name/to/tor-browser/package.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/to/tor-browser/package.nix b/pkgs/by-name/to/tor-browser/package.nix index 83bc910e7697..009c201e13f6 100644 --- a/pkgs/by-name/to/tor-browser/package.nix +++ b/pkgs/by-name/to/tor-browser/package.nix @@ -136,12 +136,6 @@ let }; } ); - - policiesJson = writeText "policies.json" ( - builtins.toJSON { - policies.DisableAppUpdate = true; - } - ); in stdenv.mkDerivation rec { pname = "tor-browser"; @@ -213,8 +207,8 @@ stdenv.mkDerivation rec { # firefox is a wrapper that checks for a more recent libstdc++ & appends it to the ld path mv firefox.real firefox - # store state at `~/.tor browser` instead of relative to executable - touch "$TBB_IN_STORE/system-install" + # store state at `~/.tor project` instead of relative to executable + touch "$TBB_IN_STORE/is-packaged-app" # The final libPath. Note, we could split this into firefoxLibPath # and torLibPath for accuracy, but this is more convenient ... @@ -331,7 +325,6 @@ stdenv.mkDerivation rec { # Install distribution customizations install -Dvm644 ${distributionIni} $out/share/tor-browser/distribution/distribution.ini - install -Dvm644 ${policiesJson} $out/share/tor-browser/distribution/policies.json runHook postInstall ''; From 75b48cfbf17e146a25f546b5f731a2e9f6b4c56d Mon Sep 17 00:00:00 2001 From: whispers Date: Wed, 27 May 2026 10:44:07 -0400 Subject: [PATCH 2/2] mullvad-browser: remove unnecessary auto-update policies This came up in Firefox as https://bugzilla.mozilla.org/show_bug.cgi?id=2042197, where policies caused different behavior to be active (also see https://github.com/NixOS/nixpkgs/pull/524793). We should not observe any such differences, but this indicates that the policy is unnecessary for disabling the updater. Tor/Mullvad Browser have supported is-packaged-app for a long time (https://gitlab.torproject.org/tpo/applications/tor-browser/-/merge_requests/985), and it's preferred by Firefox (i.e. it actually has meaning there: https://searchfox.org/firefox-main/search?q=is-packaged-app&path=&case=false®exp=false), so we switch from `system-install` to that one. This shouldn't change anything else user visible. This removes the "Your browser is being managed by your organization." text from about:preferences and changes about:policies from showing this singular policy to "The Enterprise Policies service is inactive." (the intended upstream behavior), so this seems like a win for clarity. Tested by downgrading the version in the derivation, and seeing no update UI appear, either in the hamburger menu in the toolbar or under Help > About Mullvad Browser. --- pkgs/by-name/mu/mullvad-browser/package.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkgs/by-name/mu/mullvad-browser/package.nix b/pkgs/by-name/mu/mullvad-browser/package.nix index 5dba16159a22..6f7675405b2e 100644 --- a/pkgs/by-name/mu/mullvad-browser/package.nix +++ b/pkgs/by-name/mu/mullvad-browser/package.nix @@ -123,12 +123,6 @@ let }; } ); - - policiesJson = writeText "policies.json" ( - builtins.toJSON { - policies.DisableAppUpdate = true; - } - ); in stdenv.mkDerivation rec { pname = "mullvad-browser"; @@ -200,7 +194,7 @@ stdenv.mkDerivation rec { mv mullvadbrowser.real mullvadbrowser # store state at `~/.mullvad` instead of relative to executable - touch "$MB_IN_STORE/system-install" + touch "$MB_IN_STORE/is-packaged-app" # Add bundled libraries to libPath. libPath=${libPath}:$MB_IN_STORE @@ -282,7 +276,6 @@ stdenv.mkDerivation rec { # Install distribution customizations install -Dvm644 ${distributionIni} $out/share/mullvad-browser/distribution/distribution.ini - install -Dvm644 ${policiesJson} $out/share/mullvad-browser/distribution/policies.json runHook postInstall '';