xin/lib/default.nix

19 lines
345 B
Nix
Raw Normal View History

2023-02-02 05:35:19 -07:00
let
mkCronScript = name: src: ''
. /etc/profile;
set -x
# autogenreated ${name}
${src}
'';
jobToService = job: {
name = "${job.name}";
value = {
script = mkCronScript "${job.name}_script" job.script;
inherit (job) startAt path;
};
};
xinlib = { inherit mkCronScript jobToService; };
in xinlib