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,35 +44,32 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
services.xserver.desktopManager.session = singleton {
|
services.xserver.displayManager.sessionPackages = [
|
||||||
name = "mate";
|
pkgs.mate.mate-session-manager
|
||||||
bgSupport = true;
|
];
|
||||||
start = ''
|
|
||||||
export XDG_MENU_PREFIX=mate-
|
|
||||||
|
|
||||||
# Let caja find extensions
|
services.xserver.displayManager.sessionCommands = ''
|
||||||
export CAJA_EXTENSION_DIRS=$CAJA_EXTENSION_DIRS''${CAJA_EXTENSION_DIRS:+:}${config.system.path}/lib/caja/extensions-2.0
|
if test "$XDG_CURRENT_DESKTOP" = "MATE"; then
|
||||||
|
export XDG_MENU_PREFIX=mate-
|
||||||
|
|
||||||
# Let caja extensions find gsettings schemas
|
# Let caja find extensions
|
||||||
${concatMapStrings (p: ''
|
export CAJA_EXTENSION_DIRS=$CAJA_EXTENSION_DIRS''${CAJA_EXTENSION_DIRS:+:}${config.system.path}/lib/caja/extensions-2.0
|
||||||
|
|
||||||
|
# Let caja extensions find gsettings schemas
|
||||||
|
${concatMapStrings (p: ''
|
||||||
if [ -d "${p}/lib/caja/extensions-2.0" ]; then
|
if [ -d "${p}/lib/caja/extensions-2.0" ]; then
|
||||||
${addToXDGDirs p}
|
${addToXDGDirs p}
|
||||||
fi
|
fi
|
||||||
'')
|
'') config.environment.systemPackages}
|
||||||
config.environment.systemPackages
|
|
||||||
}
|
|
||||||
|
|
||||||
# Let mate-panel find applets
|
# 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)
|
||||||
export MATE_PANEL_APPLETS_DIR=$MATE_PANEL_APPLETS_DIR''${MATE_PANEL_APPLETS_DIR:+:}${config.system.path}/share/mate-panel/applets
|
${addToXDGDirs pkgs.mate.mate-control-center}
|
||||||
export MATE_PANEL_EXTRA_MODULES=$MATE_PANEL_EXTRA_MODULES''${MATE_PANEL_EXTRA_MODULES:+:}${config.system.path}/lib/mate-panel/applets
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
# 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)
|
# Let mate-panel find applets
|
||||||
${addToXDGDirs pkgs.mate.mate-control-center}
|
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";
|
||||||
${pkgs.mate.mate-session-manager}/bin/mate-session ${optionalString cfg.debug "--debug"} &
|
|
||||||
waitPID=$!
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
pkgs.mate.basePackages ++
|
pkgs.mate.basePackages ++
|
||||||
|
@ -33,6 +33,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
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; {
|
meta = with stdenv.lib; {
|
||||||
description = "MATE Desktop session manager";
|
description = "MATE Desktop session manager";
|
||||||
homepage = "https://github.com/mate-desktop/mate-session-manager";
|
homepage = "https://github.com/mate-desktop/mate-session-manager";
|
||||||
|
Loading…
Reference in New Issue
Block a user