Continuation of previous issue where I had issues with KDE detecting my displays. Given that
optimus-manager is able to configure my other distro, I decided to mix its output and NixOS’s into a new one. I ended up getting a bootable and working state with the following config:
# Nixos prebuilt config lines above (Whatever is not explicitly specified by these lines) Section "ServerLayout" Identifier "layout" Screen 0 "nvidia" Inactive "integrated" EndSection Section "Device" Identifier "nvidia" Driver "nvidia" BusID "PCI:1:0:0" EndSection Section "Screen" Identifier "nvidia" Device "nvidia" Option "AllowEmptyInitialConfiguration" EndSection Section "Device" Identifier "integrated" Driver "modesetting" BusID "PCI:6:0:0" EndSection Section "Screen" Identifier "integrated" Device "integrated" EndSection
Which I can set in
lib.mkForce. The issue is that I’m not sure how to nixi-fy this config, since if I do not specify the config this way, these lines here will run, adding
Section "ServerLayout" Identifier "layout" # From xserver.serverLayoutSection Screen 0 "Screen-nvidia" Inactive "Device-modesetting" # Breaking extra config from the lines above Screen "Screen-modesetting" Screen "Screen-nvidia" EndSection
Will make one of a few processes kde related processes dump core on login (ie
Process 1255 (.xdg-desktop-po) of user 175 dumped core.) locking me out of my desktop. I can also reproduce this by manually editing the
xorg.config string to include them. Declaring them afterwards with
mkAfter also doesn’t seem to work either.
mkForce method does work, it hardcodes a few paths in
Section "Files" along with some other config options, so it’s less than ideal. I also tried using
services.xserver.drivers, but to be able to create a screen section, I still need to activate the same flag that sets the above lines, which means I’m back to square one.