firefox, thunderbird, librewolf: Enable wayland support by default

Enabling Wayland support by default prevents use of XWayland on Wayland
systems, while correctly falling back to X11 when Wayland is
unavailable in the current session.

With the current packaging many people unnecessarily rely on the
`firefox` attribute, which is suggested by nixos-generate-config, which
in turn makes their Firefox use XWayland, when it shouldn't, which
causes bugs with GNOME on Wayland:

https://discourse.nixos.org/t/firefox-all-black-when-first-launched-after-login/21143

Using the Wayland-enabled Firefox was tested on pure X11 systems by
contributors on the #nix-mozilla:nixos.org room and we are confident
this change will not cause severe regressions.

Even better, people can now toggle `MOZ_ENABLE_WAYLAND=<0|1>` in their
environment to override this decision, should they feel the need to do
so.
This commit is contained in:
Martin Weinelt 2022-11-15 20:11:57 +01:00
parent d325ce6c1b
commit c156bdf40d
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
5 changed files with 19 additions and 10 deletions

View File

@ -1017,6 +1017,17 @@ signald -d /var/lib/signald/db \
<section xml:id="sec-release-22.11-notable-changes">
<title>Other Notable Changes</title>
<itemizedlist>
<listitem>
<para>
<literal>firefox</literal>, <literal>thunderbird</literal> and
<literal>librewolf</literal> come with enabled Wayland support
by default. The <literal>firefox-wayland</literal>,
<literal>firefox-esr-wayland</literal>,
<literal>thunderbird-wayland</literal> and
<literal>librewolf-wayland</literal> attributes are obsolete
and have been aliased to their generic attribute.
</para>
</listitem>
<listitem>
<para>
The <literal>xplr</literal> package has been updated from

View File

@ -320,6 +320,8 @@ Available as [services.patroni](options.html#opt-services.patroni.enable).
## Other Notable Changes {#sec-release-22.11-notable-changes}
- `firefox`, `thunderbird` and `librewolf` come with enabled Wayland support by default. The `firefox-wayland`, `firefox-esr-wayland`, `thunderbird-wayland` and `librewolf-wayland` attributes are obsolete and have been aliased to their generic attribute.
- The `xplr` package has been updated from 0.18.0 to 0.19.0, which brings some breaking changes. See the [upstream release notes](https://github.com/sayanarijit/xplr/releases/tag/v0.19.0) for more details.
- `github-runner` gained support for ephemeral runners and registrations using a personal access token (PAT) instead of a registration token. See `services.github-runner.ephemeral` and `services.github-runner.tokenFile` for details.

View File

@ -33,7 +33,6 @@ let
, wmClass ? null
, extraNativeMessagingHosts ? []
, pkcs11Modules ? []
, forceWayland ? false
, useGlvnd ? true
, cfg ? config.${applicationName} or {}
@ -170,7 +169,7 @@ let
name = applicationName;
exec = "${launcherName} %U";
inherit icon;
desktopName = "${desktopName}${nameSuffix}${lib.optionalString forceWayland " (Wayland)"}";
desktopName = "${desktopName}${nameSuffix}";
startupNotify = true;
startupWMClass = wmClass;
terminal = false;
@ -309,7 +308,7 @@ let
--set MOZ_ALLOW_DOWNGRADE 1 \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
--suffix XDG_DATA_DIRS : '${gnome.adwaita-icon-theme}/share' \
${lib.optionalString forceWayland "--set MOZ_ENABLE_WAYLAND 1"} \
--set-default MOZ_ENABLE_WAYLAND 1 \
"''${oldWrapperArgs[@]}"
#############################
# #

View File

@ -437,7 +437,9 @@ mapAliases ({
finger_bsd = bsd-finger;
fingerd_bsd = bsd-fingerd;
firefox-esr-68 = throw "Firefox 68 ESR was removed because it reached end of life with its final release 68.12esr on 2020-08-25";
firefox-esr-wayland = firefox-esr; # Added 2022-11-15
firefox-esr-wrapper = throw "'firefox-esr-wrapper' has been renamed to/replaced by 'firefox-esr'"; # Converted to throw 2022-02-22
firefox-wayland = firefox; # Added 2022-11-15
firefoxWrapper = throw "'firefoxWrapper' has been renamed to/replaced by 'firefox'"; # Converted to throw 2022-02-22
firefox-wrapper = throw "'firefox-wrapper' has been renamed to/replaced by 'firefox'"; # Converted to throw 2022-02-22
firmwareLinuxNonfree = linux-firmware; # Added 2022-01-09
@ -775,6 +777,7 @@ mapAliases ({
libressl_3_2 = throw "'libressl_3_2' has reached end-of-life "; # Added 2022-03-19
librevisa = throw "librevisa has been removed because its website and source have disappeared upstream"; # Added 2022-09-23
librsync_0_9 = throw "librsync_0_9 has been removed"; # Added 2021-07-24
librewolf-wayland = librewolf; # Added 2022-11-15
libseat = seatd; # Added 2021-06-24
libspotify = throw "libspotify has been removed because Spotify stopped supporting it"; # added 2022-05-29
libstdcxxHook = throw "libstdcxx hook has been removed because cc-wrapper is now directly aware of the c++ standard library intended to be used"; # Added 2020-06-22
@ -1462,6 +1465,7 @@ mapAliases ({
tftp_hpa = throw "'tftp_hpa' has been renamed to/replaced by 'tftp-hpa'"; # Converted to throw 2022-02-22
thunderbird-68 = throw "Thunderbird 68 reached end of life with its final release 68.12.0 on 2020-08-25";
thunderbird-bin-68 = thunderbird-68;
thunderbird-wayland = thunderbird; # Added 2022-11-15
timescale-prometheus = promscale; # Added 2020-09-29
timedoctor = throw "'timedoctor' has been removed from nixpkgs"; # Added 2022-10-09
timetable = throw "timetable has been removed, as the upstream project has been abandoned"; # Added 2021-09-05

View File

@ -28697,11 +28697,9 @@ with pkgs;
firefox-esr-unwrapped = firefoxPackages.firefox-esr-102;
firefox = wrapFirefox firefox-unwrapped { };
firefox-wayland = wrapFirefox firefox-unwrapped { forceWayland = true; };
firefox-esr = firefox-esr-102;
firefox-esr-102 = wrapFirefox firefox-esr-102-unwrapped { };
firefox-esr-wayland = wrapFirefox firefox-esr-102-unwrapped { forceWayland = true; };
firefox-bin-unwrapped = callPackage ../applications/networking/browsers/firefox-bin {
inherit (gnome) adwaita-icon-theme;
@ -28743,10 +28741,6 @@ with pkgs;
libName = "librewolf";
};
librewolf-wayland = librewolf.override {
forceWayland = true;
};
firefox_decrypt = python3Packages.callPackage ../tools/security/firefox_decrypt { };
fmtoy = callPackage ../tools/audio/fmtoy { };
@ -32349,7 +32343,6 @@ with pkgs;
thunderbird-unwrapped = thunderbirdPackages.thunderbird;
thunderbird = wrapThunderbird thunderbird-unwrapped { };
thunderbird-wayland = wrapThunderbird thunderbird-unwrapped { forceWayland = true; };
thunderbird-bin = wrapThunderbird thunderbird-bin-unwrapped {
applicationName = "thunderbird";