{ config, pkgs, lib, ... }: { # https://wiki.archlinux.org/title/HiDPI#Wayland # Results in blurry font in non-Wayland applications :/ # https://wiki.archlinux.org/title/HiDPI#Xorg # https://devicetests.com/set-different-scaling-multi-monitors-gnome # "scale-monitor-framebuffer": This allows GNOME to scale each monitor’s framebuffer independently, which is necessary for per-monitor scaling. # "x11-randr-fractional-scaling": This allows fractional scaling, which gives you finer control over the scaling factor. # TODO: Open issue. Fractional scaling can't be enabled with multiple monitors. # TODO: X11 or Wayland or both? # https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2076 # https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2365 # -> https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/2008355 assertions = [{ assertion = config.services.xserver.displayManager.gdm.wayland; message = "Fractional scaling is only supported for Wayland. There is a patch for X11, but we no longer apply it in an overlay. See e.g. https://aur.archlinux.org/packages/mutter-x11-scaling"; }]; programs.dconf.enable = true; home-manager.users.yoda = { osConfig, config, pkgs, ... }: { dconf.settings = { "org/gnome/mutter" = { experimental-features = ["scale-monitor-framebuffer" "xwayland-native-scaling"]; }; }; }; }