sxmo: split bonsai out to own file

This commit is contained in:
Colin 2023-11-20 01:55:15 +00:00
parent d763f3b912
commit 9cc72c09dc
2 changed files with 15 additions and 11 deletions

View File

@ -0,0 +1,13 @@
{ sxmoPath, sxmoEnvSetup, pkgs }:
{
description = "programmable input dispatcher";
path = sxmoPath;
script = ''
${sxmoEnvSetup}
${pkgs.coreutils}/bin/rm -f $XDG_RUNTIME_DIR/bonsai
exec ${pkgs.bonsai}/bin/bonsaid -t $XDG_CONFIG_HOME/sxmo/bonsai_tree.json
'';
serviceConfig.Type = "simple";
serviceConfig.Restart = "always";
serviceConfig.RestartSec = "5s";
}

View File

@ -535,17 +535,8 @@ in
sxmo_wob = sxmoService "wob";
sxmo-x11-status = sxmoService "status_xsetroot";
bonsaid = {
description = "programmable input dispatcher";
path = sxmoPath;
script = ''
${sxmoEnvSetup}
${pkgs.coreutils}/bin/rm -f $XDG_RUNTIME_DIR/bonsai
exec ${pkgs.bonsai}/bin/bonsaid -t $XDG_CONFIG_HOME/sxmo/bonsai_tree.json
'';
serviceConfig.Type = "simple";
serviceConfig.Restart = "always";
serviceConfig.RestartSec = "5s";
bonsaid = import ./bonsai.nix {
inherit sxmoPath sxmoEnvSetup pkgs;
};
};
}