system: fix monitor order

This commit is contained in:
Dmitriy Pleshevskiy 2022-08-29 16:09:59 +03:00
parent 65dcb3784d
commit a31cbc7356
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 10 additions and 9 deletions

View file

@ -114,10 +114,6 @@ in
}; };
}; };
xsession.initExtra = ''
xrandr --output HDMI-A-0 --rotate right --left-of DisplayPort-1
'';
xdg = { xdg = {
enable = true; enable = true;
configFile = { configFile = {

View file

@ -35,16 +35,21 @@ in
}; };
services.xserver = { services.xserver = {
# All monitors in the right order
# See: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/xserver.nix#L83
xrandrHeads = [ xrandrHeads = [
{
output = "DisplayPort-1";
primary = true;
}
{ {
output = "HDMI-A-0"; output = "HDMI-A-0";
monitorConfig = '' monitorConfig = ''
Option "PreferredMode" "1920x1080"
Option "Rotate" "right" Option "Rotate" "right"
Option "LeftOf" "DisplayPort-1" '';
}
{
output = "DisplayPort-1";
primary = true;
monitorConfig = ''
Option "PreferredMode" "2560x1440"
''; '';
} }
]; ];