From e7f22174fb5158b72c4db916a5ec9a1ff0b1f793 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 8 Oct 2021 04:21:01 +0200 Subject: [PATCH] nixosTests.gnome: fix GNOME Shell 41 made the Eval command we use for NixOS tests internal so in order to be still able to use it, we need to run the shell in an unsafe mode. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970 https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1983 Hopefully, the test driver will eventually get better so that we will not need hacks like this forever. --- nixos/tests/gnome-xorg.nix | 15 +++++++++++++++ nixos/tests/gnome.nix | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/nixos/tests/gnome-xorg.nix b/nixos/tests/gnome-xorg.nix index 55f9c90c20a08..b9ff5e6828758 100644 --- a/nixos/tests/gnome-xorg.nix +++ b/nixos/tests/gnome-xorg.nix @@ -25,6 +25,21 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : { services.xserver.desktopManager.gnome.debug = true; services.xserver.displayManager.defaultSession = "gnome-xorg"; + systemd.user.services = { + "org.gnome.Shell@x11" = { + serviceConfig = { + ExecStart = [ + # Clear the list before overriding it. + "" + # Eval API is now internal so Shell needs to run in unsafe mode. + # TODO: improve test driver so that it supports openqa-like manipulation + # that would allow us to drop this mess. + "${pkgs.gnome.gnome-shell}/bin/gnome-shell --unsafe-mode" + ]; + }; + }; + }; + virtualisation.memorySize = 1024; }; diff --git a/nixos/tests/gnome.nix b/nixos/tests/gnome.nix index e8d18a41bd064..1da97f733cfd8 100644 --- a/nixos/tests/gnome.nix +++ b/nixos/tests/gnome.nix @@ -30,6 +30,21 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : { }) ]; + systemd.user.services = { + "org.gnome.Shell@wayland" = { + serviceConfig = { + ExecStart = [ + # Clear the list before overriding it. + "" + # Eval API is now internal so Shell needs to run in unsafe mode. + # TODO: improve test driver so that it supports openqa-like manipulation + # that would allow us to drop this mess. + "${pkgs.gnome.gnome-shell}/bin/gnome-shell --unsafe-mode" + ]; + }; + }; + }; + virtualisation.memorySize = 1024; };