aboutsummaryrefslogtreecommitdiff
path: root/util/modules/xserver.nix
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2024-05-10 19:48:45 -0700
committerCaroline Larimore <caroline@larimo.re>2024-05-10 19:48:45 -0700
commit6eda4acc251fed0afbf5f1a85a63e321d8234799 (patch)
tree0be125628339545e8a11cd29a994271bc16f55b3 /util/modules/xserver.nix
Initial Commit
Diffstat (limited to 'util/modules/xserver.nix')
-rw-r--r--util/modules/xserver.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/util/modules/xserver.nix b/util/modules/xserver.nix
new file mode 100644
index 0000000..1530c44
--- /dev/null
+++ b/util/modules/xserver.nix
@@ -0,0 +1,33 @@
+{ pkgs, ... }:
+
+{
+ services.xserver = {
+ enable = true;
+
+ videoDrivers = [ "amdgpu" ];
+
+ displayManager = {
+ lightdm.enable = true;
+ defaultSession = "none+i3";
+
+ 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
+ '';
+ };
+
+ windowManager.i3 = {
+ enable = true;
+ };
+
+ xkb.layout = "us";
+# xkb.options = "eurosign:e,caps:escape";
+ };
+}