From 55a4e4be40b76a6aa70c54665ae456ee5ecf6aca Mon Sep 17 00:00:00 2001 From: RGBCube Date: Tue, 4 Jun 2024 22:04:53 +0300 Subject: [PATCH] Make Discord run under Wayland fr this time, it works --- modules/discord.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/discord.nix b/modules/discord.nix index dd0ddda..1643e6e 100644 --- a/modules/discord.nix +++ b/modules/discord.nix @@ -5,8 +5,16 @@ }) (desktopUserHomePackages (with pkgs; [ - (discord.override { + ((discord.override { withOpenASAR = true; withVencord = true; - }) + }).overrideAttrs (old: { + nativeBuildInputs = old.nativeBuildInputs ++ [ makeWrapper ]; + + postFixup = '' + wrapProgram $out/opt/Discord/Discord \ + --set ELECTRON_OZONE_PLATFORM_HINT "auto" \ + --add-flags "--enable-features=UseOzonePlatform --ozone-platform=wayland" + ''; + })) ]))