by Cyph0n · 6mo ago · 0 comments
systemd.services.sync-recyclarr = {
serviceConfig.Type = "oneshot";
path = [ pkgs.podman ];
script = ''
podman exec -it recyclarr recyclarr sync radarr
podman exec -it recyclarr recyclarr sync sonarr
'';
};
systemd.timers.sync-recyclarr = {
timerConfig = {
OnCalendar = "daily";
Persistent = true;
Unit = "sync-recyclarr.service";
};
partOf = [ "sync-recyclarr.service" ];
requires = [ "podman-recyclarr.service" ];
wantedBy = [ "timers.target" ];
};I maintain one of the competitors listed in that README (compose2nix), so I am a bit biased haha.
For now, I prefer the ability to interop with Compose.
Compare it to the alternative of using plain systemd (including command(s) required to enable units).
Also, consider what build-time validation you get prior to starting the unit/timer. Hint: zero.
I do appreciate build-time checking but I think this can be solved at systemd side as a separate tool just as effectively.
But my question was around readability: were you able to understand what the snippet I shared is doing?
Re: build-time checks - but systemd hasn’t done it, and I am also unsure where exactly this verification would even take place given systemd’s configuration model. Unless you’re talking about some kind of language server or IDE integration.