1
0
Fork 0

Add dynamic triple buffering patch to Gnome

This commit is contained in:
Aires 2024-06-26 13:19:06 -04:00
parent aae4911d2e
commit c9d7eb09ba
3 changed files with 35 additions and 5 deletions

View file

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

View file

@ -99,9 +99,13 @@ in
"md.obsidian.Obsidian"
"net.waterfox.waterfox"
"org.keepassxc.KeePassXC"
"org.mozilla.firefox"
];
};
desktops.gnome.enable = true;
desktops.gnome = {
enable = true;
tripleBuffering.enable = true;
};
};
users = {
aires = {

View file

@ -12,10 +12,13 @@ in
{
options = {
aux.system.ui.desktops.gnome.enable = lib.mkEnableOption (
lib.mdDoc "Enables the Gnome Desktop Environment."
aux.system.ui.desktops.gnome = {
enable = lib.mkEnableOption (lib.mdDoc "Enables the Gnome Desktop Environment.");
tripleBuffering.enable = lib.mkEnableOption (
lib.mdDoc "(Experimental) Enables dynamic triple buffering"
);
};
};
config = lib.mkIf cfg.enable {
aux.system.ui.desktops.enable = true;
@ -102,5 +105,25 @@ in
platformTheme = "gnome";
style = "adwaita-dark";
};
nixpkgs.overlays = lib.mkIf cfg.tripleBuffering.enable [
# GNOME 46: triple-buffering-v4-46
# For details, see https://nixos.wiki/wiki/GNOME#Dynamic_triple_buffering
(final: prev: {
gnome = prev.gnome.overrideScope (
gnomeFinal: gnomePrev: {
mutter = gnomePrev.mutter.overrideAttrs (old: {
src = pkgs.fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "vanvugt";
repo = "mutter";
rev = "triple-buffering-v4-46";
hash = "sha256-fkPjB/5DPBX06t7yj0Rb3UEuu5b9mu3aS+jhH18+lpI=";
};
});
}
);
})
];
};
}