From f324e7a0a0ae3f9f23cb0ae3e1784bc36d97aa32 Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 20 Oct 2024 17:13:06 -0400 Subject: [PATCH] Gnome: bundle experimental features under one flag --- hosts/Khanda/default.nix | 5 +---- hosts/Shura/default.nix | 5 +---- modules/ui/desktops/gnome.nix | 23 ++++++----------------- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/hosts/Khanda/default.nix b/hosts/Khanda/default.nix index 5f72077..8707f94 100644 --- a/hosts/Khanda/default.nix +++ b/hosts/Khanda/default.nix @@ -60,10 +60,7 @@ in ui = { desktops.gnome = { enable = true; - experimental = { - tripleBuffering.enable = true; - vrr.enable = true; - }; + experimental.enable = false; }; flatpak = { # Enable Flatpak support. diff --git a/hosts/Shura/default.nix b/hosts/Shura/default.nix index a64d2e7..17bdb5e 100644 --- a/hosts/Shura/default.nix +++ b/hosts/Shura/default.nix @@ -97,10 +97,7 @@ in }; desktops.gnome = { enable = true; - experimental = { - fractionalScaling.enable = true; - vrr.enable = true; - }; + experimental.enable = true; }; }; users = { diff --git a/modules/ui/desktops/gnome.nix b/modules/ui/desktops/gnome.nix index 1eb4550..87b9d77 100644 --- a/modules/ui/desktops/gnome.nix +++ b/modules/ui/desktops/gnome.nix @@ -15,11 +15,7 @@ in options = { aux.system.ui.desktops.gnome = { enable = lib.mkEnableOption "Enables the Gnome Desktop Environment."; - experimental = { - 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)."; - }; + experimental.enable = lib.mkEnableOption "Enables fractional scaling, dynamic triple buffering, and variable refresh rate (VRR)."; }; }; @@ -37,20 +33,13 @@ in enable = true; # Enable experimental features - extraGSettingsOverrides = '' + extraGSettingsOverrides = lib.mkIf cfg.experimental.enable '' [org.gnome.mutter] - 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 - " ]" + experimental-features = [ + "[ 'scale-monitor-framebuffer','variable-refresh-rate' ]" ] - } ''; - extraGSettingsOverridePackages = lib.mkIf ( - cfg.experimental.fractionalScaling.enable || cfg.experimental.vrr.enable - ) [ pkgs.gnome.mutter ]; + extraGSettingsOverridePackages = lib.mkIf cfg.experimental.enable [ pkgs.gnome.mutter ]; }; displayManager.gdm.enable = true; }; @@ -124,7 +113,7 @@ in style = "adwaita-dark"; }; - nixpkgs.overlays = lib.mkIf cfg.experimental.tripleBuffering.enable [ + nixpkgs.overlays = lib.mkIf cfg.experimental.enable [ (final: prev: { gnome = prev.gnome.overrideScope ( gnomeFinal: gnomePrev: {