1
0
Fork 0

Gnome: move experimental features from home-manager to global

This commit is contained in:
Aires 2024-09-24 14:48:50 -05:00
parent 375d8591ab
commit c03150370c
5 changed files with 23 additions and 2139 deletions

View file

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

View file

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

View file

@ -18,6 +18,7 @@ in
experimental = { experimental = {
fractionalScaling.enable = lib.mkEnableOption "Enables fractional scaling."; fractionalScaling.enable = lib.mkEnableOption "Enables fractional scaling.";
tripleBuffering.enable = lib.mkEnableOption "Enables dynamic triple buffering for xwayland applications."; tripleBuffering.enable = lib.mkEnableOption "Enables dynamic triple buffering for xwayland applications.";
vrr.enable = lib.mkEnableOption "Enables variable refresh rate (VRR).";
}; };
}; };
}; };
@ -35,14 +36,21 @@ in
desktopManager.gnome = { desktopManager.gnome = {
enable = true; enable = true;
# Enable fractional scaling # Enable experimental features
extraGSettingsOverrides = lib.mkIf cfg.experimental.fractionalScaling.enable '' extraGSettingsOverrides = ''
[org.gnome.mutter] [org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer'] experimental-features = ${
lib.strings.concatStrings [
"[ "
(lib.mkIf cfg.experimental.fractionalScaling.enable "'scale-monitor-framebuffer', ").content
(lib.mkIf cfg.experimental.vrr.enable "'variable-refresh-rate'").content
" ]"
]
}
''; '';
extraGSettingsOverridePackages = lib.mkIf cfg.experimental.fractionalScaling.enable [ extraGSettingsOverridePackages = lib.mkIf (
pkgs.gnome.mutter config.services.xserver.desktopManager.gnome.extraGSettingsOverrides != ""
]; ) [ pkgs.gnome.mutter ];
}; };
displayManager.gdm.enable = true; displayManager.gdm.enable = true;
}; };
@ -122,7 +130,6 @@ in
gnome = prev.gnome.overrideScope ( gnome = prev.gnome.overrideScope (
gnomeFinal: gnomePrev: { gnomeFinal: gnomePrev: {
mutter = gnomePrev.mutter.overrideAttrs (old: { mutter = gnomePrev.mutter.overrideAttrs (old: {
# Triple buffering
src = inputs.gnome-triplebuffering; src = inputs.gnome-triplebuffering;
}); });
} }

File diff suppressed because it is too large Load diff

View file

@ -5,11 +5,6 @@
"org/gnome/mutter" = { "org/gnome/mutter" = {
edge-tiling = true; edge-tiling = true;
workspaces-only-on-primary = false; workspaces-only-on-primary = false;
experimental-features = [
"scale-monitor-framebuffer" # Fractional scaling
"xwayland-native-scaling" # Related to fractional scaline
"variable-refresh-rate" # VRR
];
}; };
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {