aboutsummaryrefslogtreecommitdiff
path: root/hosts/c-pc/configuration.nix
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2024-07-25 23:02:06 -0700
committerCaroline Larimore <caroline@larimo.re>2024-07-25 23:02:06 -0700
commit87c1648dc37a832f90df8b26b00a311b796ed893 (patch)
tree9cd8709a6d53b3712f4b7fe36474323d66b33c12 /hosts/c-pc/configuration.nix
parent2f17e369400b9c895b3554008ab3efbc76255428 (diff)
roles: desktop: replace hardcoded setupCommands with option
Diffstat (limited to 'hosts/c-pc/configuration.nix')
-rw-r--r--hosts/c-pc/configuration.nix15
1 files changed, 14 insertions, 1 deletions
diff --git a/hosts/c-pc/configuration.nix b/hosts/c-pc/configuration.nix
index 6d49784..22ceed6 100644
--- a/hosts/c-pc/configuration.nix
+++ b/hosts/c-pc/configuration.nix
@@ -54,7 +54,20 @@
];
roles = {
- desktop.enable = true;
+ desktop = {
+ enable = true;
+ setupCommands = ''
+ if ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1080; then
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x0
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1080 --rate 60 --pos 1920x0 --primary
+ ${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-A-0 --mode 1920x1080 --rate 75 --pos 4480x0
+ elif ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1440; then
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x360
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1440 --rate 165 --pos 1920x0 --primary
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 --mode 1920x1200 --rate 60 --pos 4480x0
+ fi
+ '';
+ };
};
programs = {