firefox: wrap with nixGL by default

This commit is contained in:
Mel Bourgeois 2024-04-29 19:38:08 -05:00
parent 1ff6b80294
commit 53482ffc42
No known key found for this signature in database
GPG Key ID: 290FCF081AEDB3EC
1 changed files with 6 additions and 4 deletions

View File

@ -238,10 +238,12 @@ in {
package = mkOption {
type = with types; nullOr package;
default = if versionAtLeast config.home.stateVersion "19.09" then
pkgs.firefox
else
pkgs.firefox-unwrapped;
# Wrap with nixGL by default to provide hardware-accelerated WebRender
default = (config.lib.nixGL.wrap
(if versionAtLeast config.home.stateVersion "19.09" then
pkgs.firefox
else
pkgs.firefox-unwrapped));
defaultText = literalExpression "pkgs.firefox";
example = literalExpression ''
pkgs.firefox.override {