mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 16:45:51 +03:00
Merge pull request #276060 from bobby285271/fix/cinnamon-sessionpath
nixos/cinnamon: Unbreak sessionPath option
This commit is contained in:
commit
5cb00274f2
@ -79,20 +79,19 @@ in
|
||||
package = mkDefault pkgs.cinnamon.mint-cursor-themes;
|
||||
};
|
||||
};
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
if test "$XDG_CURRENT_DESKTOP" = "Cinnamon"; then
|
||||
true
|
||||
${concatMapStrings (p: ''
|
||||
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
|
||||
fi
|
||||
|
||||
if [ -d "${p}/lib/girepository-1.0" ]; then
|
||||
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
|
||||
fi
|
||||
'') cfg.sessionPath}
|
||||
fi
|
||||
# Have to take care of GDM + Cinnamon on Wayland users
|
||||
environment.extraInit = ''
|
||||
${concatMapStrings (p: ''
|
||||
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
|
||||
fi
|
||||
|
||||
if [ -d "${p}/lib/girepository-1.0" ]; then
|
||||
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
|
||||
fi
|
||||
'') cfg.sessionPath}
|
||||
'';
|
||||
|
||||
# Default services
|
||||
|
@ -12,6 +12,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
autoLogin.user = nodes.machine.users.users.alice.name;
|
||||
defaultSession = "cinnamon-wayland";
|
||||
};
|
||||
|
||||
# For the sessionPath subtest.
|
||||
services.xserver.desktopManager.cinnamon.sessionPath = [ pkgs.gnome.gpaste ];
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
@ -47,6 +50,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
machine.wait_until_succeeds("journalctl -b --grep 'Loaded applet menu@cinnamon.org'")
|
||||
machine.wait_until_succeeds("journalctl -b --grep 'calendar@cinnamon.org: Calendar events supported'")
|
||||
|
||||
with subtest("Check if sessionPath option actually works"):
|
||||
machine.succeed("${eval "imports.gi.GIRepository.Repository.get_search_path\\(\\)"} | grep gpaste")
|
||||
|
||||
with subtest("Open Cinnamon Settings"):
|
||||
machine.succeed("${su "cinnamon-settings themes >&2 &"}")
|
||||
machine.wait_until_succeeds("${eval "global.display.focus_window.wm_class"} | grep -i 'cinnamon-settings'")
|
||||
|
@ -7,6 +7,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
imports = [ ./common/user-account.nix ];
|
||||
services.xserver.enable = true;
|
||||
services.xserver.desktopManager.cinnamon.enable = true;
|
||||
|
||||
# For the sessionPath subtest.
|
||||
services.xserver.desktopManager.cinnamon.sessionPath = [ pkgs.gnome.gpaste ];
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
@ -49,6 +52,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||
machine.wait_until_succeeds("journalctl -b --grep 'Loaded applet menu@cinnamon.org'")
|
||||
machine.wait_until_succeeds("journalctl -b --grep 'calendar@cinnamon.org: Calendar events supported'")
|
||||
|
||||
with subtest("Check if sessionPath option actually works"):
|
||||
machine.succeed("${eval "imports.gi.GIRepository.Repository.get_search_path\\(\\)"} | grep gpaste")
|
||||
|
||||
with subtest("Open Cinnamon Settings"):
|
||||
machine.succeed("${su "cinnamon-settings themes >&2 &"}")
|
||||
machine.wait_until_succeeds("${eval "global.display.focus_window.wm_class"} | grep -i 'cinnamon-settings'")
|
||||
|
Loading…
Reference in New Issue
Block a user