mirror of
https://codeberg.org/privacy1st/nix-git
synced 2024-11-21 22:03:19 +01:00
fractional scaling in X11/Wayland
This commit is contained in:
parent
a0bf823599
commit
a812363039
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# https://wiki.archlinux.org/title/HiDPI#Wayland
|
# https://wiki.archlinux.org/title/HiDPI#Wayland
|
||||||
@ -11,7 +11,9 @@
|
|||||||
# Overlays.
|
# Overlays.
|
||||||
# https://nixos.wiki/wiki/Overlays#In_NixOS
|
# https://nixos.wiki/wiki/Overlays#In_NixOS
|
||||||
# https://discourse.nixos.org/t/use-specific-pkg-version-in-overlay/32741/3
|
# https://discourse.nixos.org/t/use-specific-pkg-version-in-overlay/32741/3
|
||||||
nixpkgs.overlays = [
|
|
||||||
|
# If on X11, then use patched version of mutter.
|
||||||
|
nixpkgs.overlays = lib.mkIf (! config.services.xserver.displayManager.gdm.wayland) [
|
||||||
(
|
(
|
||||||
# Patched version of mutter 44.2.
|
# Patched version of mutter 44.2.
|
||||||
# Outdated example: https://nixos.wiki/wiki/Overlays#Overriding_a_package_inside_a_scope
|
# Outdated example: https://nixos.wiki/wiki/Overlays#Overriding_a_package_inside_a_scope
|
||||||
@ -55,10 +57,13 @@
|
|||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
"org/gnome/mutter" = {
|
"org/gnome/mutter" = {
|
||||||
experimental-features = [
|
experimental-features = [
|
||||||
|
(
|
||||||
|
if (osConfig.services.xserver.displayManager.gdm.wayland)
|
||||||
# Wayland fractional scaling
|
# Wayland fractional scaling
|
||||||
"scale-monitor-framebuffer"
|
then "scale-monitor-framebuffer"
|
||||||
# X11 fractional scaling
|
# X11 fractional scaling
|
||||||
"x11-randr-fractional-scaling"
|
else "x11-randr-fractional-scaling"
|
||||||
|
)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user