From a31cbc7356bf1c202e4528f1fefeaa4ce0203646 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Mon, 29 Aug 2022 16:09:59 +0300 Subject: [PATCH] system: fix monitor order --- home/home.nix | 4 ---- system/machine/home/default.nix | 15 ++++++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/home/home.nix b/home/home.nix index 6754ae0..a31bb9c 100644 --- a/home/home.nix +++ b/home/home.nix @@ -114,10 +114,6 @@ in }; }; - xsession.initExtra = '' - xrandr --output HDMI-A-0 --rotate right --left-of DisplayPort-1 - ''; - xdg = { enable = true; configFile = { diff --git a/system/machine/home/default.nix b/system/machine/home/default.nix index 13c06c3..044058d 100644 --- a/system/machine/home/default.nix +++ b/system/machine/home/default.nix @@ -35,16 +35,21 @@ in }; services.xserver = { + # All monitors in the right order + # See: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/x11/xserver.nix#L83 xrandrHeads = [ - { - output = "DisplayPort-1"; - primary = true; - } { output = "HDMI-A-0"; monitorConfig = '' + Option "PreferredMode" "1920x1080" Option "Rotate" "right" - Option "LeftOf" "DisplayPort-1" + ''; + } + { + output = "DisplayPort-1"; + primary = true; + monitorConfig = '' + Option "PreferredMode" "2560x1440" ''; } ];