Hi, I installed fresh NixOS with KDE Plasma 6 on wayland session. I also have Nvidia proprietary if that is somewhat relevant. First thing I wanted to do was modify my three monitor layout so I have it set after next installation. When I was using hyprland, I set it in hypr.conf, now I am using Gnome and I copy monitors.xml into .config, but I can’t find any way, how to do it in KDE. I tried xrandrHeads, but it had no effect with anything I tried to set there. When I rearrange the monitor layout in graphical interface in KDE, then the layout is persistent, but I have no idea where this setting is saved. There is some file xinputoutput.json (or something similar, I am not booted into KDE now so I dont remember exactly) in .config folder that seems to have some monitor configuration, but any change there is overwritten on next login, so it is obviously generated from somewhere else. Any help please?
Also Im using sddm on wayland, so maybe if there is a way to properly setup layout also for that, it would be great, but it is just a bonus
I tried KDE Plasma 6 on NixOS before switching to Sway.
My understanding is that KDE is not easy to configure via Nix, even using home-manager. The config files all seem to have a complex format which is specific to KDE.
There is a community project called plasma-manager which is attempting to provide better Nix support for KDE Plasma 5 and 6, but it’s still a work in progress and not fully reliable yet.
Out of the listed supported features on the project page, I can’t see any mention of configuring monitors. But the project might at least have some tools you can use to better configure KDE from Nix, maybe enough to build your own solution if it’s not fully supported currently?
Also, you haven’t mentioned home-manager in your question, but if you’re not using it I’d highly recommend it for managing config files. It has a lot of helpers for other software (not so much KDE unfortunately) which let you manage your config from one unified Nix repository.
If you do try plasma-manager, I believe home-manager is a dependency. You’ll need to add both as additional “channels” for your NixOS setup.
And as another aside: my understanding is that the proprietary Nvidia driver doesn’t support Wayland at all, so that’s not likely to help things unless you really want to switch back to X.
Starting with the nvidia 555 series driver (which is stable now) it supports Wayland a lot better than it used to.
So it might be worth trying out Wayland after all.
Yes, I am using home manager and I tried plasma-manager, but it seems it does not have option to configure monitor layout. At least when I changed layout, then used plasma-manager’s rc2nix tool, I haven’t found anything regarding to monitors.
Sway don’t support Nvidia driver at all, is that correct?
As for proprietary Nvidia and Wayland, it is not true. I have run hyprland in the past with Nvidia proprietary without any issues. Now I have Gnome on Wayland and it is working well. In fact it is working much better on Wayland than on X. I tried also Xfce, but I haven’t manage to find any configuration without conciderable screan tearing.
HDMI monitor is native 2560x1440, other two 1920x1080. And if I want to manually change resolution, I get:
[rstasta@nixos:~]$ xrandr --output HDMI-A-1 --mode 2560x1440
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 7 (RRSetScreenSize)
Serial number of failed request: 36
Current serial number in output stream: 37
So I suspect, that those xrandrHeads from original questions are not working, because of those strange xrandr values and errors (that seem to come form intel driver somehow messing with those values, because when I disable it, values are okay).