liminix/pkgs/service-fns/default.nix
2023-03-03 22:21:27 +00:00

10 lines
242 B
Nix

{writeText}:
writeText "service-fns.sh" ''
output() { cat $1/.outputs/$2; }
output_path() { echo $(realpath $1/.outputs)/$2; }
mkoutputs() {
d=/run/service-state/$1
mkdir -m 2750 -p $d && chown root:system $d
echo $d
}
''