2024-03-04 00:34:39 +03:00
|
|
|
{ pkgs, ... }: {
|
|
|
|
systemd.services.photos_process = {
|
|
|
|
enable = true;
|
|
|
|
description = "Process uploaded photos.";
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
2024-03-23 14:50:41 +03:00
|
|
|
ExecStart = ./bin/PhotosProcess;
|
2024-03-04 00:34:39 +03:00
|
|
|
};
|
|
|
|
path = with pkgs; [
|
|
|
|
bashInteractive
|
|
|
|
docker
|
|
|
|
];
|
|
|
|
# wantedBy = [ "multi-user.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.timers.photos_process = {
|
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "daily";
|
|
|
|
Persistent = true;
|
|
|
|
Unit = "photos_process.service";
|
|
|
|
};
|
|
|
|
wantedBy = [ "timers.target" ];
|
|
|
|
};
|
|
|
|
}
|