nixos/coma: init sleep as desktop manager
This commit is contained in:
parent
46f57b4388
commit
21303714af
21
krebs/3modules/upstream/desktop-managers/coma.nix
Normal file
21
krebs/3modules/upstream/desktop-managers/coma.nix
Normal file
@ -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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./coma.nix
|
||||||
./none.nix
|
./none.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user