From 46f57b43888027bd245d14087fc096329729cb03 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 25 Jan 2021 01:42:51 +0100 Subject: nixos/none: don't pull in feh unconditionally --- krebs/3modules/upstream/desktop-managers/default.nix | 5 +++++ krebs/3modules/upstream/desktop-managers/none.nix | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 krebs/3modules/upstream/desktop-managers/default.nix create mode 100644 krebs/3modules/upstream/desktop-managers/none.nix (limited to 'krebs/3modules/upstream/desktop-managers') diff --git a/krebs/3modules/upstream/desktop-managers/default.nix b/krebs/3modules/upstream/desktop-managers/default.nix new file mode 100644 index 000000000..4f60ee27d --- /dev/null +++ b/krebs/3modules/upstream/desktop-managers/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./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 ; +{ + disabledModules = singleton "services/x11/desktop-managers/none.nix"; + config.services.xserver.desktopManager.session = singleton { + name = "none"; + bgSupport = true; + start = ""; + }; +} -- cgit v1.2.3 From 21303714afa87ca3081a9fbc4585d86badc131bb Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 25 Jan 2021 01:46:22 +0100 Subject: nixos/coma: init sleep as desktop manager --- krebs/3modules/upstream/desktop-managers/coma.nix | 21 +++++++++++++++++++++ .../3modules/upstream/desktop-managers/default.nix | 1 + 2 files changed, 22 insertions(+) create mode 100644 krebs/3modules/upstream/desktop-managers/coma.nix (limited to 'krebs/3modules/upstream/desktop-managers') 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 ; +{ 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 index 4f60ee27d..22e75439d 100644 --- a/krebs/3modules/upstream/desktop-managers/default.nix +++ b/krebs/3modules/upstream/desktop-managers/default.nix @@ -1,5 +1,6 @@ { imports = [ + ./coma.nix ./none.nix ]; } -- cgit v1.2.3