1
0
Fork 0

Gnome: bundle experimental features under one flag

This commit is contained in:
Aires 2024-10-20 17:13:06 -04:00
parent 845abac217
commit 33c46de7c0
3 changed files with 7 additions and 26 deletions

View file

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

View file

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

View file

@ -15,11 +15,7 @@ in
options = { options = {
aux.system.ui.desktops.gnome = { aux.system.ui.desktops.gnome = {
enable = lib.mkEnableOption "Enables the Gnome Desktop Environment."; enable = lib.mkEnableOption "Enables the Gnome Desktop Environment.";
experimental = { experimental.enable = lib.mkEnableOption "Enables fractional scaling, dynamic triple buffering, and variable refresh rate (VRR).";
fractionalScaling.enable = lib.mkEnableOption "Enables fractional scaling.";
tripleBuffering.enable = lib.mkEnableOption "Enables dynamic triple buffering for xwayland applications.";
vrr.enable = lib.mkEnableOption "Enables variable refresh rate (VRR).";
};
}; };
}; };
@ -37,20 +33,11 @@ in
enable = true; enable = true;
# Enable experimental features # Enable experimental features
extraGSettingsOverrides = '' extraGSettingsOverrides = lib.mkIf cfg.experimental.enable ''
[org.gnome.mutter] [org.gnome.mutter]
experimental-features = ${ experimental-features = [ 'scale-monitor-framebuffer','variable-refresh-rate' ]
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 ( extraGSettingsOverridePackages = lib.mkIf cfg.experimental.enable [ pkgs.gnome.mutter ];
cfg.experimental.fractionalScaling.enable || cfg.experimental.vrr.enable
) [ pkgs.gnome.mutter ];
}; };
displayManager.gdm.enable = true; displayManager.gdm.enable = true;
}; };
@ -124,7 +111,7 @@ in
style = "adwaita-dark"; style = "adwaita-dark";
}; };
nixpkgs.overlays = lib.mkIf cfg.experimental.tripleBuffering.enable [ nixpkgs.overlays = lib.mkIf cfg.experimental.enable [
(final: prev: { (final: prev: {
gnome = prev.gnome.overrideScope ( gnome = prev.gnome.overrideScope (
gnomeFinal: gnomePrev: { gnomeFinal: gnomePrev: {