diff --git a/settings/gdm-monitor.nix b/settings/gdm-monitor.nix new file mode 100644 index 0000000..5242e26 --- /dev/null +++ b/settings/gdm-monitor.nix @@ -0,0 +1,43 @@ +# settings/gdm-monitor-sync.nix +{ config, pkgs, lib, ... }: + +{ + # Copy monitors.xml to GDM's config directory to prevent display mode changes during login + # This eliminates the black screen/signal loss when transitioning from GDM to user session + + environment.etc."gdm-monitors.xml" = { + source = pkgs.writeText "monitors.xml" '' + + + physical + + 0 + 0 + 1 + yes + + + DP-3 + GBT + G34WQCP + 25272B000088 + + + 3440 + 1440 + 190.000 + + + + + + ''; + target = "gdm-monitors.xml"; + }; + + # Create GDM config directory and symlink the monitors.xml file + systemd.tmpfiles.rules = [ + "d /var/lib/gdm/.config 0711 gdm gdm" + "L+ /var/lib/gdm/.config/monitors.xml - - - - /etc/gdm-monitors.xml" + ]; +}