This commit is contained in:
dusk 2021-06-08 15:07:11 +03:00
parent 03e5c0d183
commit c286cf9903
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
3 changed files with 36 additions and 12 deletions

View File

@ -143,9 +143,18 @@ in
vaapiVdpau
libva
vulkan-loader
vulkan-validation-layers
vulkan-extension-layer
];
extraPackages32 = with pkgs.pkgsi686Linux;
[ libvdpau-va-gl vaapiVdpau libva vulkan-loader ]
[
libvdpau-va-gl
vaapiVdpau
libva
vulkan-loader
vulkan-validation-layers
vulkan-extension-layer
]
++ [ pkgs.driversi686Linux.amdvlk ];
};
pulseaudio = {
@ -162,8 +171,9 @@ in
directories = [ "/etc/nixos" ];
files = [ "/etc/machine-id" ];
};
variables = {
sessionVariables = {
VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/amd_icd64.json";
LD_LIBRARY_PATH = lib.mkForce "${lib.makeLibraryPath (config.hardware.opengl.extraPackages ++ config.hardware.opengl.extraPackages32)}";
};
};
networking.interfaces.enp6s0.useDHCP = true;

View File

@ -69,6 +69,10 @@ final: prev: rec {
, libappindicator-gtk3
, libdbusmenu
, nodePackages
, vulkan-loader
, vulkan-validation-layers
, vulkan-extension-layer
, libGL
}:
stdenv.mkDerivation rec {
inherit pname version src;
@ -130,6 +134,10 @@ final: prev: rec {
libXScrnSaver
libappindicator-gtk3
libdbusmenu
vulkan-loader
vulkan-validation-layers
vulkan-extension-layer
libGL
];
flags = (lib.optionals isWayland [

View File

@ -133,8 +133,6 @@ in
"--enable-gpu-rasterization"
"--enable-zero-copy"
"--disable-gpu-driver-bug-workarounds"
# "--enable-features=VaapiVideoDecoder"
# "--use-gl=egl"
];
in
pkgs.writeScriptBin "chromium-wayland" ''
@ -154,8 +152,6 @@ in
"--enable-gpu-rasterization"
"--enable-zero-copy"
"--disable-gpu-driver-bug-workarounds"
# "--enable-features=VaapiVideoDecoder"
# "--use-gl=egl"
];
in
pkgs.writeScriptBin "vscodium-wayland" ''
@ -175,12 +171,17 @@ in
pkgs.stdenv.mkDerivation {
name = name;
phases = [ "installPhase" ];
nativeBuildInputs = [ pkgs.makeWrapper ];
phases = [ "installPhase" "fixupPhase" ];
installPhase = ''
mkdir $out
ln -s ${vscodiumWayland}/bin $out/bin
mkdir -p $out/bin
ln -s ${vscodiumWayland}/bin/${name} $out/bin
ln -s ${desktop}/share $out/share
'';
fixupPhase = ''
wrapProgram $out/bin/${name} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader vulkan-validation-layers vulkan-extension-layer libGL ])}
'';
};
chromiumWaylandPkg =
let
@ -196,12 +197,17 @@ in
pkgs.stdenv.mkDerivation {
name = name;
phases = [ "installPhase" ];
nativeBuildInputs = [ pkgs.makeWrapper ];
phases = [ "installPhase" "fixupPhase" ];
installPhase = ''
mkdir $out
ln -s ${chromiumWayland}/bin $out/bin
mkdir -p $out/bin
ln -s ${chromiumWayland}/bin/${name} $out/bin
ln -s ${desktop}/share $out/share
'';
fixupPhase = ''
wrapProgram $out/bin/${name} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader vulkan-validation-layers vulkan-extension-layer libGL ])}
'';
};
colorSchemeLight = {