diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2022-02-19 07:03:02 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2022-03-25 15:02:32 +0100 |
commit | 185522691f5cd562a80a511b3560844780a58953 (patch) | |
tree | eb07e5ff82b38f764bcdf0f1a4e1b5bde8c832d2 /nixos/modules | |
parent | 47dbd9f99a44e728f12058ce6c95874954ba30e3 (diff) | |
download | nixlib-185522691f5cd562a80a511b3560844780a58953.tar nixlib-185522691f5cd562a80a511b3560844780a58953.tar.gz nixlib-185522691f5cd562a80a511b3560844780a58953.tar.bz2 nixlib-185522691f5cd562a80a511b3560844780a58953.tar.lz nixlib-185522691f5cd562a80a511b3560844780a58953.tar.xz nixlib-185522691f5cd562a80a511b3560844780a58953.tar.zst nixlib-185522691f5cd562a80a511b3560844780a58953.zip |
nixos/gnome: Remove realtime scheduling option
It is now accomplished using rtkit rather than setcap wrapper: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2060 Replace the option with `security.rtkit.enable`. Closes: https://github.com/NixOS/nixpkgs/issues/90201 Closes: https://github.com/NixOS/nixpkgs/issues/86730
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/gnome.nix | 59 |
1 files changed, 4 insertions, 55 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixos/modules/services/x11/desktop-managers/gnome.nix index 4bbf59c0d158..98e240f66100 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome.nix @@ -132,6 +132,10 @@ in [ "environment" "gnome3" "excludePackages" ] [ "environment" "gnome" "excludePackages" ] ) + (mkRemovedOptionModule + [ "services" "gnome" "experimental-features" "realtime-scheduling" ] + "Set `security.rtkit.enable = true;` to make realtime scheduling possible. (Still needs to be enabled using GSettings.)" + ) ]; options = { @@ -142,38 +146,6 @@ in core-utilities.enable = mkEnableOption "GNOME core utilities"; core-developer-tools.enable = mkEnableOption "GNOME core developer tools"; games.enable = mkEnableOption "GNOME games"; - - experimental-features = { - realtime-scheduling = mkOption { - type = types.bool; - default = false; - description = '' - Makes mutter (which propagates to gnome-shell) request a low priority real-time - scheduling which is only available on the wayland session. - To enable this experimental feature it requires a restart of the compositor. - Note that enabling this option only enables the <emphasis>capability</emphasis> - for realtime-scheduling to be used. It doesn't automatically set the gsetting - so that mutter actually uses realtime-scheduling. This would require adding <literal> - rt-scheduler</literal> to <literal>/org/gnome/mutter/experimental-features</literal> - with dconf-editor. You cannot use extraGSettingsOverrides because that will only - change the default value of the setting. - - Please be aware of these known issues with the feature in nixos: - <itemizedlist> - <listitem> - <para> - <link xlink:href="https://github.com/NixOS/nixpkgs/issues/90201">NixOS/nixpkgs#90201</link> - </para> - </listitem> - <listitem> - <para> - <link xlink:href="https://github.com/NixOS/nixpkgs/issues/86730">NixOS/nixpkgs#86730</link> - </para> - </listitem> - </itemizedlist> - ''; - }; - }; }; services.xserver.desktopManager.gnome = { @@ -480,29 +452,6 @@ in ]; }) - # Enable soft realtime scheduling, only supported on wayland - (mkIf serviceCfg.experimental-features.realtime-scheduling { - security.wrappers.".gnome-shell-wrapped" = { - source = "${pkgs.gnome.gnome-shell}/bin/.gnome-shell-wrapped"; - owner = "root"; - group = "root"; - capabilities = "cap_sys_nice=ep"; - }; - - systemd.user.services.gnome-shell-wayland = let - gnomeShellRT = with pkgs.gnome; pkgs.runCommand "gnome-shell-rt" {} '' - mkdir -p $out/bin/ - cp ${gnome-shell}/bin/gnome-shell $out/bin - sed -i "s@${gnome-shell}/bin/@${config.security.wrapperDir}/@" $out/bin/gnome-shell - ''; - in { - # Note we need to clear ExecStart before overriding it - serviceConfig.ExecStart = ["" "${gnomeShellRT}/bin/gnome-shell"]; - # Do not use the default environment, it provides a broken PATH - environment = mkForce {}; - }; - }) - # Adapt from https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/gnome-3-38/elements/core/meta-gnome-core-utilities.bst (mkIf serviceCfg.core-utilities.enable { environment.systemPackages = |