nixos/xfce: use sessionPackages

This commit is contained in:
worldofpeace 2020-01-22 23:44:50 -05:00
parent a149202c5a
commit 966e56cdfb
2 changed files with 22 additions and 11 deletions

View File

@ -127,14 +127,9 @@ in
"/share/gtksourceview-4.0"
];
services.xserver.desktopManager.session = [{
name = "xfce";
bgSupport = true;
start = ''
${pkgs.runtimeShell} ${pkgs.xfce.xfce4-session.xinitrc} &
waitPID=$!
'';
}];
services.xserver.displayManager.sessionPackages = [
pkgs.xfce.xfce4-session
];
services.xserver.updateDbusEnvironment = true;
services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];

View File

@ -1,4 +1,4 @@
{ mkXfceDerivation, polkit, exo, libxfce4util, libxfce4ui, xfconf, iceauth, gtk3, glib, libwnck3, xorg, xfce4-session }:
{ mkXfceDerivation, polkit, exo, libxfce4util, libxfce4ui, xfconf, iceauth, gtk3, glib, libwnck3, xorg, xfce4-session, runtimeShell }:
mkXfceDerivation {
category = "xfce";
@ -14,9 +14,25 @@ mkXfceDerivation {
# See https://github.com/NixOS/nixpkgs/issues/36468
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
passthru.xinitrc = "${xfce4-session}/etc/xdg/xfce4/xinitrc";
# Don't use startxfce4 in xfce.desktop
# It's has FHS isms
postFixup = ''
chmod +x $out/etc/xdg/xfce4/xinitrc
patchShebangs $out/etc/xdg/xfce4/xinitrc
meta = {
substituteInPlace "$out/share/xsessions/xfce.desktop" \
--replace "Exec=startxfce4" "Exec=$out/etc/xdg/xfce4/xinitrc"
'';
passthru = {
xinitrc = "${xfce4-session}/etc/xdg/xfce4/xinitrc";
providedSessions = [
"xfce"
];
};
meta = {
description = "Session manager for Xfce";
};
}