From 51e6afac23732198c6f1560ec6edcde57786d3ed Mon Sep 17 00:00:00 2001 From: matt1432 Date: Tue, 27 Feb 2024 17:23:48 -0500 Subject: [PATCH] fix(discord): only add opengl paths to nvidia pc --- modules/hyprland/packages.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/hyprland/packages.nix b/modules/hyprland/packages.nix index 16efa232..e7c61054 100644 --- a/modules/hyprland/packages.nix +++ b/modules/hyprland/packages.nix @@ -1,9 +1,12 @@ { config, + lib, pkgs, ... }: let inherit (config.vars) mainUser; + + isNvidia = config.hardware.nvidia.modesetting.enable; in { imports = [../dolphin.nix]; @@ -58,10 +61,11 @@ in { ]; buildInputs = [makeWrapper]; postBuild = '' - wrapProgram $out/bin/Discord --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ - addOpenGLRunpath.driverLink - libglvnd - ]}" \ + wrapProgram $out/bin/Discord ${lib.optionalString isNvidia + ''--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ + addOpenGLRunpath.driverLink + libglvnd + ]}"''} \ --add-flags "--enable-features=UseOzonePlatform --ozone-platform=wayland" ''; })