diff --git a/nixos/doc/manual/release-notes/rl-2611.section.md b/nixos/doc/manual/release-notes/rl-2611.section.md index b79405846542..262419e87126 100644 --- a/nixos/doc/manual/release-notes/rl-2611.section.md +++ b/nixos/doc/manual/release-notes/rl-2611.section.md @@ -409,6 +409,11 @@ - The full-text search backend changed from Whoosh to Tantivy. The search index is rebuilt automatically on the first start after upgrading, which can take a while for large document sets. - Some settings changed or were removed (for example, an external database now needs an explicit `PAPERLESS_DBENGINE`); review your `services.paperless.settings` against the migration guide. +- `firefox` no longer defaults to allowing silent downgrades that can lead to loss of important browser state. + This matches the behaviour which upstream Firefox has intended since version 67. + In case of an intended or necessary downgrade, users are advised to use the [`-allow-downgrade` CLI argument](https://wiki.mozilla.org/Firefox/CommandLineOptions#-allow-downgrade) or `MOZ_ALLOW_DOWNGRADE=1` environment variable to accept the risk of data loss and continue using the profile. + Users who frequently downgrade Firefox versions can use the `allowDowngrade` override to restore the previous behaviour of setting the environment variable by default. + - `services.alps` has been rewritten, see [upstream repository](https://github.com/migadu/alps) for configuration. - Nginx no longer includes the unmaintained dav module per default. diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 3ba423c8677c..a8c04f9f89e1 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -76,6 +76,10 @@ let libName ? browser.libName or applicationName, # Important for tor package or the like nixExtensions ? null, hasMozSystemDirPatch ? (lib.hasPrefix "firefox" pname && !lib.hasSuffix "-bin" pname), + # Using a profile last written to by a newer version of firefox is + # possible in many cases but can lead to partial data loss without + # warning. This flag allows opting into that behaviour. + allowDowngrade ? false, }: let @@ -329,7 +333,8 @@ let "--set" "MOZ_LEGACY_PROFILES" "1" - + ] + ++ lib.optionals allowDowngrade [ "--set" "MOZ_ALLOW_DOWNGRADE" "1"