forked from pub-solar/os
graphical: make wayland use the software renderer pixman optionally,
https://github.com/swaywm/wlroots/blob/master/docs/env_vars.md#wlroots-specific This should help run sway in VMs
This commit is contained in:
parent
2c9fef6cbd
commit
741c0863ed
|
@ -26,6 +26,11 @@ in
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
wayland.software-renderer.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Feature flag enabling wlroots software renderer, useful in VMs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
psCfg = config.pub-solar;
|
psCfg = config.pub-solar;
|
||||||
|
wlroots = psCfg.graphical.wayland;
|
||||||
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
||||||
variables = {
|
variables = {
|
||||||
XDG_CONFIG_HOME = xdg.configHome;
|
XDG_CONFIG_HOME = xdg.configHome;
|
||||||
|
@ -15,6 +16,7 @@ let
|
||||||
ECORE_EVAS_ENGINE = "wayland_egl";
|
ECORE_EVAS_ENGINE = "wayland_egl";
|
||||||
ELM_ENGINE = "wayland_egl";
|
ELM_ENGINE = "wayland_egl";
|
||||||
SDL_VIDEODRIVER = "wayland";
|
SDL_VIDEODRIVER = "wayland";
|
||||||
|
WLR_RENDERER = if wlroots.software-renderer.enable then "pixman" else "gles2";
|
||||||
|
|
||||||
EDITOR = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
|
EDITOR = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
|
||||||
VISUAL = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
|
VISUAL = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
|
||||||
|
|
Loading…
Reference in a new issue