sway: use vulkan renderer on NVidia GPU
This commit is contained in:
parent
fea78e7fc1
commit
590dbd8706
|
@ -22,6 +22,11 @@ with lib;
|
|||
(mkIf (config.hwAccelerationGPU == "intel") intel-compute-runtime)
|
||||
(mkIf (config.hwAccelerationGPU == "nvidia") libvdpau-va-gl)
|
||||
(mkIf (config.hwAccelerationGPU == "nvidia") vaapiVdpau)
|
||||
(mkIf (config.hwAccelerationGPU == "nvidia") vulkan-validation-layers)
|
||||
(mkIf (config.hwAccelerationGPU == "nvidia") vulkan-headers)
|
||||
(mkIf (config.hwAccelerationGPU == "nvidia") vulkan-caps-viewer)
|
||||
(mkIf (config.hwAccelerationGPU == "nvidia") vulkan-extension-layer)
|
||||
(mkIf (config.hwAccelerationGPU == "nvidia") vulkan-tools)
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -26,7 +26,10 @@ with lib;
|
|||
./home-manager
|
||||
sopsHmModule
|
||||
];
|
||||
home-manager.extraSpecialArgs.keymap = config.keymap;
|
||||
home-manager.extraSpecialArgs = {
|
||||
keymap = config.keymap;
|
||||
nvidiaGPU = (config.hwAccelerationGPU == "nvidia");
|
||||
};
|
||||
home-manager.users = builtins.mapAttrs
|
||||
(name: value:
|
||||
mkIf value.enableHomeManagerProfile ({
|
||||
|
|
|
@ -8,7 +8,10 @@ let
|
|||
(builtins.attrNames config.machineUsers);
|
||||
in
|
||||
{
|
||||
programs.sway.enable = usersHasSway;
|
||||
programs.sway = {
|
||||
enable = usersHasSway;
|
||||
};
|
||||
|
||||
xdg.portal = mkIf usersHasSway {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ config, pkgs, lib, keymap, ... }:
|
||||
{ config, pkgs, lib, keymap, nvidiaGPU, ... }:
|
||||
with lib;
|
||||
let
|
||||
isQwerty = keymap == "us";
|
||||
gnomeSchema = "org.gnome.desktop.interface";
|
||||
rendererLine = if nvidiaGPU then "export WLR_RENDERER=vulkan" else "";
|
||||
monitorModule = types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
|
@ -237,6 +238,7 @@ in
|
|||
'';
|
||||
|
||||
extraSessionCommands = ''
|
||||
${rendererLine}
|
||||
export WLR_NO_HARDWARE_CURSORS=1
|
||||
export XDG_CURRENT_DESKTOP=sway
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
|
|
Loading…
Reference in a new issue