blob: 1d4ffd2fadfc443ed32a1cde98dea737867e07e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# wip, need to look into nixpkgs.lib.extend
{
# create runit backend specific turnstile service
mkExecutableService =
{
name,
command,
log,
}:
let
sh = s: "#!/bin/sh\n${s}"
in
{
"${name}" = {
run = sh ''exec chpst -e "$TURNSTILE_ENV_DIR" ${command}'';
log = lib.sh ''exec vlogger -t ${name}-$(id -u) -p daemon'';
# creating syslog but tagging with uid, might want to change this to local logging?
# user cant read unless in socklog group and using socklog
};
}
}
|