summaryrefslogtreecommitdiffstats
path: root/krebs/3modules/upstream/desktop-managers/coma.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2021-02-03 23:18:38 +0100
committerlassulus <lassulus@lassul.us>2021-02-03 23:18:38 +0100
commit0a53ef2a0d06bf347a24eb86132068289568e79c (patch)
tree923f3736a760190dcb79fea18be670062a822bad /krebs/3modules/upstream/desktop-managers/coma.nix
parent5d4e3a953e2c1f8a6c606640f7e8a94e4f64133d (diff)
parent61aebc5adcab3a174a6e27686c0c8fc7f65df513 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs/3modules/upstream/desktop-managers/coma.nix')
-rw-r--r--krebs/3modules/upstream/desktop-managers/coma.nix21
1 files changed, 21 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 00000000..95db7fb5
--- /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
+ '';
+ };
+ };
+}