1
0
Fork 0

Gnome: replace fractional scaling method and re-enable for Shura

This commit is contained in:
Aires 2024-09-24 12:07:59 -05:00
parent df98a718a3
commit 375d8591ab
3 changed files with 19 additions and 7 deletions

View file

@ -55,7 +55,7 @@ in
ui = {
desktops.gnome = {
enable = true;
experimentalFeatures.enable = true;
experimental.tripleBuffering.enable = true;
};
flatpak = {
# Enable Flatpak support.

View file

@ -108,7 +108,7 @@ in
};
desktops.gnome = {
enable = true;
experimentalFeatures.enable = true;
experimental.fractionalScaling.enable = true;
};
};
users = {

View file

@ -15,7 +15,10 @@ in
options = {
aux.system.ui.desktops.gnome = {
enable = lib.mkEnableOption "Enables the Gnome Desktop Environment.";
experimentalFeatures.enable = lib.mkEnableOption "Enables dynamic triple buffering and fractional scaling for xwayland applications.";
experimental = {
fractionalScaling.enable = lib.mkEnableOption "Enables fractional scaling.";
tripleBuffering.enable = lib.mkEnableOption "Enables dynamic triple buffering for xwayland applications.";
};
};
};
@ -29,7 +32,18 @@ in
excludePackages = [ pkgs.xterm ];
# Enable Gnome
desktopManager.gnome.enable = true;
desktopManager.gnome = {
enable = true;
# Enable fractional scaling
extraGSettingsOverrides = lib.mkIf cfg.experimental.fractionalScaling.enable ''
[org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer']
'';
extraGSettingsOverridePackages = lib.mkIf cfg.experimental.fractionalScaling.enable [
pkgs.gnome.mutter
];
};
displayManager.gdm.enable = true;
};
@ -103,15 +117,13 @@ in
style = "adwaita-dark";
};
nixpkgs.overlays = lib.mkIf cfg.experimentalFeatures.enable [
nixpkgs.overlays = lib.mkIf cfg.experimental.tripleBuffering.enable [
(final: prev: {
gnome = prev.gnome.overrideScope (
gnomeFinal: gnomePrev: {
mutter = gnomePrev.mutter.overrideAttrs (old: {
# Triple buffering
src = inputs.gnome-triplebuffering;
# Scaling patch sourced from https://aur.archlinux.org/packages/mutter-xwayland-scaling
patches = [ ./patches/gnome-mutter-xwayland-scaling.patch ];
});
}
);