diff --git a/hosts/monolith/configuration.nix b/hosts/monolith/configuration.nix index b96213b..7e0240e 100644 --- a/hosts/monolith/configuration.nix +++ b/hosts/monolith/configuration.nix @@ -83,6 +83,27 @@ services.udev.packages = [pkgs.openhantek6022]; virtualisation.docker.enable = true; + # dpi correction + services.xserver.dpi = 91; + environment.variables = { + ## Used by GTK 3 + # `GDK_SCALE` is limited to integer values + GDK_SCALE = "1"; + # Inverse of GDK_SCALE + GDK_DPI_SCALE = "1"; + + # Used by Qt 5 + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + + _JAVA_OPTIONS = "-Dsun.java2d.uiScale=1"; + }; + # Expose variables to graphical systemd user services + services.xserver.displayManager.importedVariables = [ + "GDK_SCALE" + "GDK_DPI_SCALE" + "QT_AUTO_SCREEN_SCALE_FACTOR" + ]; + # Enable OpenGL hardware.graphics = { enable = true;