Previously, I configured everything in configuration.nix. Now I am trying to configure as much as possible via home-manager. I would like to get Sway working with as little installed in configuration.nix as possible.
Here is a minimal home.nix
that demonstrates the error message:
{ config, pkgs, ... }:
{
programs.home-manager.enable = true;
home.stateVersion = "20.03";
wayland.windowManager.sway.enable = true;
}
And here is the error message I get when attempting to start sway:
MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open kms_swrast (search paths /run/opengl-driver/lib/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /run/opengl-driver/lib/dri)
failed to load swrast driver
2020-08-22 16:59:44 - [backend/drm/renderer.c:19] Failed to create GBM device
2020-08-22 16:59:44 - [backend/drm/backend.c:203] Failed to initialize renderer
2020-08-22 16:59:44 - [backend/backend.c:163] Failed to open DRM device 9
2020-08-22 16:59:44 - [backend/backend.c:304] Failed to open any DRM device
2020-08-22 16:59:44 - [sway/server.c:47] Unable to create backend
I verified that the amdgpu module is loaded:
$ lsmod | grep ^amdgpu
amdgpu 4689920 1
Other than boot.initrd.availableKernelModules = [ "amdgpu" ];
I haven’t put anything grapics related into configuration.nix and I am wondering if I am missing something. What should I try next?
Bonus question: right now wayland.windowManager.sway.xwayland = false;
(the default) but eventually I will likely need to enable it. Will I be able to configure everything to run Xwayland via home-manager or will I need to add something to configuration.nix?