Old-materusPC: use nvidia gpu for steam and browser
This commit is contained in:
parent
cff5051f75
commit
7d42994f21
|
@ -71,7 +71,53 @@
|
||||||
editor.emacs.enable = false;
|
editor.emacs.enable = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
xdg.desktopEntries.brave-browser = let env = lib.concatStringsSep " " [
|
||||||
|
''VK_ICD_FILENAMES=''$VK_ICD_FILENAMES:/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/nvidia_icd.i686.json''
|
||||||
|
''__NV_PRIME_RENDER_OFFLOAD="1"''
|
||||||
|
''__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0"''
|
||||||
|
''__GLX_VENDOR_LIBRARY_NAME="nvidia"''
|
||||||
|
''__VK_LAYER_NV_optimus="NVIDIA_only"''
|
||||||
|
];
|
||||||
|
script = pkgs.writeShellScript "brave" ''
|
||||||
|
${env} brave "$@"
|
||||||
|
'';
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
name = "Brave Web Browser";
|
||||||
|
genericName = "Przeglądarka WWW";
|
||||||
|
comment = "Skorzystaj z internetu";
|
||||||
|
exec = "${script} %U";
|
||||||
|
icon = "brave-browser";
|
||||||
|
terminal = false;
|
||||||
|
categories = [ "Application" "Network" "WebBrowser" ];
|
||||||
|
mimeType = [
|
||||||
|
"application/pdf"
|
||||||
|
"application/rdf+xml"
|
||||||
|
"application/rss+xml"
|
||||||
|
"application/xhtml+xml"
|
||||||
|
"application/xhtml_xml"
|
||||||
|
"application/xml"
|
||||||
|
"image/gif"
|
||||||
|
"image/jpeg"
|
||||||
|
"image/png"
|
||||||
|
"image/webp"
|
||||||
|
"text/html"
|
||||||
|
"text/xml"
|
||||||
|
"x-scheme-handler/http"
|
||||||
|
"x-scheme-handler/https"
|
||||||
|
"x-scheme-handler/ipfs"
|
||||||
|
"x-scheme-handler/ipns"
|
||||||
|
];
|
||||||
|
actions.new-windows = {
|
||||||
|
exec = "${script}";
|
||||||
|
name = "Nowe okno";
|
||||||
|
};
|
||||||
|
actions.new-private-windows = {
|
||||||
|
exec = "${script} --incognito";
|
||||||
|
name = "Nowe okno incognito";
|
||||||
|
};
|
||||||
|
};
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.papirus-icon-theme
|
pkgs.papirus-icon-theme
|
||||||
(materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvm-ce ]; })
|
(materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvm-ce ]; })
|
||||||
|
|
|
@ -28,5 +28,9 @@
|
||||||
];
|
];
|
||||||
materus.profile.steam.extraEnv = {
|
materus.profile.steam.extraEnv = {
|
||||||
VK_ICD_FILENAMES=''''$VK_ICD_FILENAMES:/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/nvidia_icd.i686.json'';
|
VK_ICD_FILENAMES=''''$VK_ICD_FILENAMES:/run/opengl-driver/share/vulkan/icd.d/nvidia_icd.x86_64.json:/run/opengl-driver-32/share/vulkan/icd.d/nvidia_icd.i686.json'';
|
||||||
|
__NV_PRIME_RENDER_OFFLOAD="1";
|
||||||
|
__NV_PRIME_RENDER_OFFLOAD_PROVIDER="NVIDIA-G0";
|
||||||
|
__GLX_VENDOR_LIBRARY_NAME="nvidia";
|
||||||
|
__VK_LAYER_NV_optimus="NVIDIA_only";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue