summary refs log tree commit diff
path: root/nixos/modules/services/x11/display-managers/account-service-util.nix
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2019-12-10 15:10:30 +0100
committerJan Tojnar <jtojnar@gmail.com>2019-12-15 04:16:20 +0100
commit8dc5ff7dcfd1c58c32004ffae25e6d31ed83d86c (patch)
treeefe04b82b4f7fbc455b63b002b4b4721b50a2b05 /nixos/modules/services/x11/display-managers/account-service-util.nix
parent53ef29c1380424e4e697725c4f3df30f9acacebc (diff)
downloadnixpkgs-8dc5ff7dcfd1c58c32004ffae25e6d31ed83d86c.tar
nixpkgs-8dc5ff7dcfd1c58c32004ffae25e6d31ed83d86c.tar.gz
nixpkgs-8dc5ff7dcfd1c58c32004ffae25e6d31ed83d86c.tar.bz2
nixpkgs-8dc5ff7dcfd1c58c32004ffae25e6d31ed83d86c.tar.lz
nixpkgs-8dc5ff7dcfd1c58c32004ffae25e6d31ed83d86c.tar.xz
nixpkgs-8dc5ff7dcfd1c58c32004ffae25e6d31ed83d86c.tar.zst
nixpkgs-8dc5ff7dcfd1c58c32004ffae25e6d31ed83d86c.zip
nixos/displayManager: deprecate separate options for default wm/dm
The upstream session files display managers use have no concept of sessions being composed from
desktop manager and window manager. To be able to set upstream session files as default
session, we need a single option. Having two different ways to set default session would be confusing,
though, so we decided to deprecate the old method.

We also created separate script for each session, just like we already had a separate desktop
file for each one, and started using displayManager.sessionPackages mechanism to make the
session handling more uniform.
Diffstat (limited to 'nixos/modules/services/x11/display-managers/account-service-util.nix')
-rw-r--r--nixos/modules/services/x11/display-managers/account-service-util.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/display-managers/account-service-util.nix b/nixos/modules/services/x11/display-managers/account-service-util.nix
new file mode 100644
index 00000000000..1dbe703b566
--- /dev/null
+++ b/nixos/modules/services/x11/display-managers/account-service-util.nix
@@ -0,0 +1,39 @@
+{ accountsservice
+, glib
+, gobject-introspection
+, python3
+, wrapGAppsHook
+}:
+
+python3.pkgs.buildPythonApplication {
+  name = "set-session";
+
+  format = "other";
+
+  src = ./set-session.py;
+
+  dontUnpack = true;
+
+  strictDeps = false;
+
+  nativeBuildInputs = [
+    wrapGAppsHook
+    gobject-introspection
+  ];
+
+  buildInputs = [
+    accountsservice
+    glib
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    pygobject3
+    ordered-set
+  ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp $src $out/bin/set-session
+    chmod +x $out/bin/set-session
+  '';
+}