mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
nixos/mate: use upstream session
This commit is contained in:
parent
1b96f9b68c
commit
b9db3f8ca0
@ -44,10 +44,12 @@ in
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.xserver.desktopManager.session = singleton {
|
||||
name = "mate";
|
||||
bgSupport = true;
|
||||
start = ''
|
||||
services.xserver.displayManager.sessionPackages = [
|
||||
pkgs.mate.mate-session-manager
|
||||
];
|
||||
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
if test "$XDG_CURRENT_DESKTOP" = "MATE"; then
|
||||
export XDG_MENU_PREFIX=mate-
|
||||
|
||||
# Let caja find extensions
|
||||
@ -58,21 +60,16 @@ in
|
||||
if [ -d "${p}/lib/caja/extensions-2.0" ]; then
|
||||
${addToXDGDirs p}
|
||||
fi
|
||||
'')
|
||||
config.environment.systemPackages
|
||||
}
|
||||
|
||||
# Let mate-panel find applets
|
||||
export MATE_PANEL_APPLETS_DIR=$MATE_PANEL_APPLETS_DIR''${MATE_PANEL_APPLETS_DIR:+:}${config.system.path}/share/mate-panel/applets
|
||||
export MATE_PANEL_EXTRA_MODULES=$MATE_PANEL_EXTRA_MODULES''${MATE_PANEL_EXTRA_MODULES:+:}${config.system.path}/lib/mate-panel/applets
|
||||
'') config.environment.systemPackages}
|
||||
|
||||
# Add mate-control-center paths to some XDG variables because its schemas are needed by mate-settings-daemon, and mate-settings-daemon is a dependency for mate-control-center (that is, they are mutually recursive)
|
||||
${addToXDGDirs pkgs.mate.mate-control-center}
|
||||
|
||||
${pkgs.mate.mate-session-manager}/bin/mate-session ${optionalString cfg.debug "--debug"} &
|
||||
waitPID=$!
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# Let mate-panel find applets
|
||||
environment.sessionVariables."MATE_PANEL_APPLETS_DIR" = "${config.system.path}/share/mate-panel/applets";
|
||||
environment.sessionVariables."MATE_PANEL_EXTRA_MODULES" = "${config.system.path}/lib/mate-panel/applets";
|
||||
|
||||
environment.systemPackages =
|
||||
pkgs.mate.basePackages ++
|
||||
|
@ -33,6 +33,14 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postFixup = ''
|
||||
substituteInPlace $out/share/xsessions/mate.desktop \
|
||||
--replace "Exec=mate-session" "Exec=$out/bin/mate-session" \
|
||||
--replace "TryExec=mate-session" "TryExec=$out/bin/mate-session"
|
||||
'';
|
||||
|
||||
passthru.providedSessions = [ "mate" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "MATE Desktop session manager";
|
||||
homepage = "https://github.com/mate-desktop/mate-session-manager";
|
||||
|
Loading…
Reference in New Issue
Block a user