sway: fix bonsai to be visible in the sandbox

This commit is contained in:
Colin 2024-05-30 09:46:04 +00:00
parent 6eefb9ce20
commit adb54657d4
2 changed files with 8 additions and 1 deletions

View File

@ -112,10 +112,14 @@ in
services.bonsaid = {
description = "bonsai: programmable input dispatcher";
dependencyOf = [ "sway" ]; # to ensure `$XDG_RUNTIME_DIR/bonsai` exists before sway binds it
partOf = [ "graphical-session" ];
# nice -n -11 chosen arbitrarily. i hope this will allow for faster response to inputs, but without audio underruns (pipewire is -21, dino -15-ish)
command = "nice -n -11 bonsaid -t $HOME/.config/bonsai/bonsai_tree.json";
cleanupCommand = "rm -f $XDG_RUNTIME_DIR/bonsai";
readiness.waitExists = [
"$XDG_RUNTIME_DIR/bonsai"
];
};
};
}

View File

@ -190,7 +190,10 @@ in
sandbox.whitelistDri = true;
sandbox.whitelistX = true; # sway invokes xwayland itself
sandbox.whitelistWayland = true;
sandbox.extraRuntimePaths = [ "sway" ];
sandbox.extraRuntimePaths = [
"bonsai"
"sway"
];
sandbox.extraPaths = [
# "/dev/input"
"/run/seatd.sock" #< required if not using `logind` systemd login manager