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;
|
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
|
# Have to take care of GDM + Cinnamon on Wayland users
|
||||||
export GI_TYPELIB_PATH=$GI_TYPELIB_PATH''${GI_TYPELIB_PATH:+:}${p}/lib/girepository-1.0
|
environment.extraInit = ''
|
||||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${p}/lib
|
${concatMapStrings (p: ''
|
||||||
fi
|
if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then
|
||||||
'') cfg.sessionPath}
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name}
|
||||||
fi
|
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
|
# Default services
|
||||||
|
|
|
@ -12,6 +12,9 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
|
||||||
autoLogin.user = nodes.machine.users.users.alice.name;
|
autoLogin.user = nodes.machine.users.users.alice.name;
|
||||||
defaultSession = "cinnamon-wayland";
|
defaultSession = "cinnamon-wayland";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# For the sessionPath subtest.
|
||||||
|
services.xserver.desktopManager.cinnamon.sessionPath = [ pkgs.gnome.gpaste ];
|
||||||
};
|
};
|
||||||
|
|
||||||
enableOCR = true;
|
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 'Loaded applet menu@cinnamon.org'")
|
||||||
machine.wait_until_succeeds("journalctl -b --grep 'calendar@cinnamon.org: Calendar events supported'")
|
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"):
|
with subtest("Open Cinnamon Settings"):
|
||||||
machine.succeed("${su "cinnamon-settings themes >&2 &"}")
|
machine.succeed("${su "cinnamon-settings themes >&2 &"}")
|
||||||
machine.wait_until_succeeds("${eval "global.display.focus_window.wm_class"} | grep -i 'cinnamon-settings'")
|
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 ];
|
imports = [ ./common/user-account.nix ];
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.desktopManager.cinnamon.enable = true;
|
services.xserver.desktopManager.cinnamon.enable = true;
|
||||||
|
|
||||||
|
# For the sessionPath subtest.
|
||||||
|
services.xserver.desktopManager.cinnamon.sessionPath = [ pkgs.gnome.gpaste ];
|
||||||
};
|
};
|
||||||
|
|
||||||
enableOCR = true;
|
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 'Loaded applet menu@cinnamon.org'")
|
||||||
machine.wait_until_succeeds("journalctl -b --grep 'calendar@cinnamon.org: Calendar events supported'")
|
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"):
|
with subtest("Open Cinnamon Settings"):
|
||||||
machine.succeed("${su "cinnamon-settings themes >&2 &"}")
|
machine.succeed("${su "cinnamon-settings themes >&2 &"}")
|
||||||
machine.wait_until_succeeds("${eval "global.display.focus_window.wm_class"} | grep -i 'cinnamon-settings'")
|
machine.wait_until_succeeds("${eval "global.display.focus_window.wm_class"} | grep -i 'cinnamon-settings'")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user