From d25ffc3a0c299f9ef98578898709ff7ffc031137 Mon Sep 17 00:00:00 2001 From: Naïm Favier Date: Sat, 15 Jan 2022 21:52:57 +0100 Subject: nixos/gdm: add gdm to XDG_DATA_DIRS This is necessary so that gnome-session can find GDM's gnome-login.session, see https://gitlab.gnome.org/GNOME/gdm/-/issues/756 --- nixos/modules/services/x11/display-managers/gdm.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 6f0d645725e..386bba91ed9 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -149,7 +149,7 @@ in environment = { GDM_X_SERVER_EXTRA_ARGS = toString (filter (arg: arg != "-terminate") cfg.xserverArgs); - XDG_DATA_DIRS = "${cfg.sessionData.desktops}/share/"; + XDG_DATA_DIRS = "${gdm}/share:${cfg.sessionData.desktops}/share"; } // optionalAttrs (xSessionWrapper != null) { # Make GDM use this wrapper before running the session, which runs the # configured setupCommands. This relies on a patched GDM which supports -- cgit 1.4.1 From 23cfef7ec0b27f88992c75ccebb9eae371f22041 Mon Sep 17 00:00:00 2001 From: Naïm Favier Date: Sat, 15 Jan 2022 21:53:58 +0100 Subject: nixos: make GIO_EXTRA_MODULES a session variable Allow applications started by the systemd user session manager to find their GIO_EXTRA_MODULES. --- nixos/modules/programs/dconf.nix | 2 +- nixos/modules/services/desktops/gnome/glib-networking.nix | 2 +- nixos/modules/services/desktops/gvfs.nix | 2 +- nixos/modules/services/x11/display-managers/gdm.nix | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/programs/dconf.nix b/nixos/modules/programs/dconf.nix index 298abac8afa..265c41cbbbc 100644 --- a/nixos/modules/programs/dconf.nix +++ b/nixos/modules/programs/dconf.nix @@ -60,7 +60,7 @@ in environment.systemPackages = [ pkgs.dconf ]; # Needed for unwrapped applications - environment.variables.GIO_EXTRA_MODULES = mkIf cfg.enable [ "${pkgs.dconf.lib}/lib/gio/modules" ]; + environment.sessionVariables.GIO_EXTRA_MODULES = mkIf cfg.enable [ "${pkgs.dconf.lib}/lib/gio/modules" ]; }; } diff --git a/nixos/modules/services/desktops/gnome/glib-networking.nix b/nixos/modules/services/desktops/gnome/glib-networking.nix index 4288b6b5de6..1039605391a 100644 --- a/nixos/modules/services/desktops/gnome/glib-networking.nix +++ b/nixos/modules/services/desktops/gnome/glib-networking.nix @@ -38,7 +38,7 @@ with lib; systemd.packages = [ pkgs.glib-networking ]; - environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.glib-networking.out}/lib/gio/modules" ]; + environment.sessionVariables.GIO_EXTRA_MODULES = [ "${pkgs.glib-networking.out}/lib/gio/modules" ]; }; diff --git a/nixos/modules/services/desktops/gvfs.nix b/nixos/modules/services/desktops/gvfs.nix index 27864fad4f2..1aa64ea37db 100644 --- a/nixos/modules/services/desktops/gvfs.nix +++ b/nixos/modules/services/desktops/gvfs.nix @@ -57,7 +57,7 @@ in services.udev.packages = [ pkgs.libmtp.out ]; # Needed for unwrapped applications - environment.variables.GIO_EXTRA_MODULES = [ "${cfg.package}/lib/gio/modules" ]; + environment.sessionVariables.GIO_EXTRA_MODULES = [ "${cfg.package}/lib/gio/modules" ]; }; diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 386bba91ed9..1a0383623b2 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -149,6 +149,7 @@ in environment = { GDM_X_SERVER_EXTRA_ARGS = toString (filter (arg: arg != "-terminate") cfg.xserverArgs); + # GDM is needed for gnome-login.session XDG_DATA_DIRS = "${gdm}/share:${cfg.sessionData.desktops}/share"; } // optionalAttrs (xSessionWrapper != null) { # Make GDM use this wrapper before running the session, which runs the -- cgit 1.4.1 From a298b23c10d740a986a8d372638a23f3f9d3f45f Mon Sep 17 00:00:00 2001 From: Naïm Favier Date: Fri, 21 Jan 2022 03:44:13 +0100 Subject: nixos/tests: also set TimeoutStart in systemd.user.extraConfig --- nixos/modules/testing/test-instrumentation.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix index a7011be7e04..01447e6ada8 100644 --- a/nixos/modules/testing/test-instrumentation.nix +++ b/nixos/modules/testing/test-instrumentation.nix @@ -109,6 +109,10 @@ in # Allow very slow start DefaultTimeoutStartSec=300 ''; + systemd.user.extraConfig = '' + # Allow very slow start + DefaultTimeoutStartSec=300 + ''; boot.consoleLogLevel = 7; -- cgit 1.4.1