From 3b9cd8ae5f0a37b6d3614ba2d6a43a101a67f94e Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 28 Jun 2024 17:56:02 -0700 Subject: [PATCH] moving randr to hardware --- hosts/snowhawk/hardware-configuration.nix | 4 +++ modules/dwm.nix | 30 +++++++++++------------ 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/hosts/snowhawk/hardware-configuration.nix b/hosts/snowhawk/hardware-configuration.nix index 01cdcaa..43e4109 100644 --- a/hosts/snowhawk/hardware-configuration.nix +++ b/hosts/snowhawk/hardware-configuration.nix @@ -34,6 +34,10 @@ # Load nvidia driver for Xorg and Wayland services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; services.xserver.dpi = lib.mkDefault 96; + services.xserver.xrandrHeads = [ + "HDMI-0" + { output = "DP-0"; primary = true; } + ]; hardware.nvidia = { diff --git a/modules/dwm.nix b/modules/dwm.nix index f93f480..4173659 100644 --- a/modules/dwm.nix +++ b/modules/dwm.nix @@ -23,21 +23,21 @@ in fade = false; }; - systemd.user.services.screenlayout = { - script = '' - ${pkgs.xorg.xrandr}/bin/xrandr \ - --output DP-0 --primary --mode 1920x1080 --pos 1922x0 --rotate normal \ - --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal \ - --output DP-1 --off \ - --output DP-2 --off \ - --output DP-3 --off \ - --output DP-4 --off \ - --output DP-5 --off \ - --output HDMI-1 --off - ''; - wantedBy = [ "graphical-session.target" ]; - partOf = [ "graphical-session.target" ]; - }; + # systemd.user.services.screenlayout = { + # script = '' + # ${pkgs.xorg.xrandr}/bin/xrandr \ + # --output DP-0 --primary --mode 1920x1080 --pos 1922x0 --rotate normal \ + # --output HDMI-0 --mode 1920x1080 --pos 0x0 --rotate normal \ + # --output DP-1 --off \ + # --output DP-2 --off \ + # --output DP-3 --off \ + # --output DP-4 --off \ + # --output DP-5 --off \ + # --output HDMI-1 --off + # ''; + # wantedBy = [ "graphical-session.target" ]; + # partOf = [ "graphical-session.target" ]; + # }; systemd.user.services.xrootdatetime = { script = ''