Make vm stuff better

This commit is contained in:
Gerg-L 2024-06-05 22:53:42 -04:00
parent 445fe9aa37
commit cc12240ed8
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
3 changed files with 24 additions and 14 deletions

View file

@ -19,8 +19,13 @@ let
pkgs.gnugrep
];
text = ''
xrandr --output DP-0 --auto --mode 3440x1440 --rate 120 --primary --pos 0x0
xrandr --output "$(xrandr | grep -e 'HDMI.* connected.*'| awk '{ print$1 }')" --auto --mode 1920x1080 --rate 144 --set TearFree on --pos 3440x360
xrandr --setprovideroutputsource \
"$(xrandr --listproviders | grep -i AMD | sed -n 's/^.*name://p')" NVIDIA-0 \
--output DP-0 \
--mode 3440x1440 --rate 120 --primary --pos 0x0 \
--output "$(xrandr | grep -e 'HDMI.* connected.*'| awk '{ print$1 }')" \
--mode 1920x1080 --rate 144 --set TearFree on --pos 3440x360
xset -dpms
'';
};
@ -34,13 +39,19 @@ in
services.xserver = {
config = lib.mkForce "";
displayManager.sessionCommands = lib.mkBefore ''
displayManager.setupCommands = lib.mkBefore ''
if ! [ -e "/etc/Xorg/ONE_MONITOR" ] ; then
${lib.getExe cfg_monitors}
fi
'';
};
boot.kernelPatches = lib.singleton {
name = "fix_amd_mem_access";
patch = null;
extraStructuredConfig.HSA_AMD_SVM = lib.kernel.yes;
};
systemd.tmpfiles.rules = [
"L /etc/X11/xorg.conf.d/99-custom.conf - - - - /etc/Xorg/2_mon.conf"