summary refs log tree commit diff
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2020-02-07 10:16:26 -0500
committerworldofpeace <worldofpeace@protonmail.ch>2020-02-07 10:16:26 -0500
commit5e307dc68d9ba72a056543fb0b9b9b8772515313 (patch)
treef6f29d14ad0519df92035f23722f94ed0628d303
parentd35c686843b15bfe47d89eb6c67304505b485884 (diff)
downloadnixpkgs-5e307dc68d9ba72a056543fb0b9b9b8772515313.tar
nixpkgs-5e307dc68d9ba72a056543fb0b9b9b8772515313.tar.gz
nixpkgs-5e307dc68d9ba72a056543fb0b9b9b8772515313.tar.bz2
nixpkgs-5e307dc68d9ba72a056543fb0b9b9b8772515313.tar.lz
nixpkgs-5e307dc68d9ba72a056543fb0b9b9b8772515313.tar.xz
nixpkgs-5e307dc68d9ba72a056543fb0b9b9b8772515313.tar.zst
nixpkgs-5e307dc68d9ba72a056543fb0b9b9b8772515313.zip
Revert "nixos/xfce: use sessionPackages"
This reverts commit 966e56cdfbedc8be3dce8c5ea6050ce4d3075103.

See https://github.com/NixOS/nixpkgs/pull/78421#issuecomment-582891431.
-rw-r--r--nixos/modules/services/x11/desktop-managers/xfce.nix11
-rw-r--r--pkgs/desktops/xfce/core/xfce4-session/default.nix22
2 files changed, 11 insertions, 22 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index 21f59074f3a..a08b1947f65 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -127,9 +127,14 @@ in
       "/share/gtksourceview-4.0"
     ];
 
-    services.xserver.displayManager.sessionPackages = [
-      pkgs.xfce.xfce4-session
-    ];
+    services.xserver.desktopManager.session = [{
+      name = "xfce";
+      bgSupport = true;
+      start = ''
+        ${pkgs.runtimeShell} ${pkgs.xfce.xfce4-session.xinitrc} &
+        waitPID=$!
+      '';
+    }];
 
     services.xserver.updateDbusEnvironment = true;
     services.xserver.gdk-pixbuf.modulePackages = [ pkgs.librsvg ];
diff --git a/pkgs/desktops/xfce/core/xfce4-session/default.nix b/pkgs/desktops/xfce/core/xfce4-session/default.nix
index f97c07156c5..0ab362aa21d 100644
--- a/pkgs/desktops/xfce/core/xfce4-session/default.nix
+++ b/pkgs/desktops/xfce/core/xfce4-session/default.nix
@@ -1,4 +1,4 @@
-{ mkXfceDerivation, polkit, exo, libxfce4util, libxfce4ui, xfconf, iceauth, gtk3, glib, libwnck3, xorg, xfce4-session, runtimeShell }:
+{ mkXfceDerivation, polkit, exo, libxfce4util, libxfce4ui, xfconf, iceauth, gtk3, glib, libwnck3, xorg, xfce4-session }:
 
 mkXfceDerivation {
   category = "xfce";
@@ -14,25 +14,9 @@ mkXfceDerivation {
   # See https://github.com/NixOS/nixpkgs/issues/36468
   NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
 
-  # 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
+  passthru.xinitrc = "${xfce4-session}/etc/xdg/xfce4/xinitrc";
 
-    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 = {
+  meta =  {
     description = "Session manager for Xfce";
   };
 }