summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/upstream/desktop-managers
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-02-11 14:06:45 +0100
committermakefu <github@syntax-fehler.de>2021-02-11 14:06:45 +0100
commit540e13721d85dcf100bf3529414d96cd8e28a446 (patch)
tree7db6b3955f8f06af83434027e4825f8b160ba9d4 /krebs/3modules/upstream/desktop-managers
parent38bddfd404b4418b4e820dfbd312145fc6abca68 (diff)
parentd0e7bc46b4cdb15f7505aa069ac29588b02ddf92 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/3modules/upstream/desktop-managers')
-rw-r--r--krebs/3modules/upstream/desktop-managers/coma.nix21
-rw-r--r--krebs/3modules/upstream/desktop-managers/default.nix6
-rw-r--r--krebs/3modules/upstream/desktop-managers/none.nix11
3 files changed, 38 insertions, 0 deletions
diff --git a/krebs/3modules/upstream/desktop-managers/coma.nix b/krebs/3modules/upstream/desktop-managers/coma.nix
new file mode 100644
index 000000000..95db7fb5c
--- /dev/null
+++ b/krebs/3modules/upstream/desktop-managers/coma.nix
@@ -0,0 +1,21 @@
+with import <stockholm/lib>;
+{ config, pkgs, ... }: {
+ options = {
+ services.xserver.desktopManager.coma = {
+ enable = mkEnableOption "sleep as a desktop manager";
+ };
+ };
+ config = mkIf config.services.xserver.desktopManager.coma.enable {
+ services.xserver.desktopManager.session = singleton {
+ name = "coma";
+ bgSupport = true;
+ start = /* sh */ ''
+ if test -n "$waitPID"; then
+ ${pkgs.uutils-coreutils}/bin/uutils-sleep 1s && kill $waitPID &
+ wait $waitPID
+ fi
+ exec -a sleep ${pkgs.uutils-coreutils}/bin/uutils-sleep infinity
+ '';
+ };
+ };
+}
diff --git a/krebs/3modules/upstream/desktop-managers/default.nix b/krebs/3modules/upstream/desktop-managers/default.nix
new file mode 100644
index 000000000..22e75439d
--- /dev/null
+++ b/krebs/3modules/upstream/desktop-managers/default.nix
@@ -0,0 +1,6 @@
+{
+ imports = [
+ ./coma.nix
+ ./none.nix
+ ];
+}
diff --git a/krebs/3modules/upstream/desktop-managers/none.nix b/krebs/3modules/upstream/desktop-managers/none.nix
new file mode 100644
index 000000000..892def985
--- /dev/null
+++ b/krebs/3modules/upstream/desktop-managers/none.nix
@@ -0,0 +1,11 @@
+# Replace upstream none desktop-manager by a real none, that doesn't pull in
+# any dependencies.
+with import <stockholm/lib>;
+{
+ disabledModules = singleton "services/x11/desktop-managers/none.nix";
+ config.services.xserver.desktopManager.session = singleton {
+ name = "none";
+ bgSupport = true;
+ start = "";
+ };
+}