2024-07-07 10:53:17 -04:00
|
|
|
{ inputs, pkgs, ... }:
|
2024-06-22 12:40:50 -04:00
|
|
|
{
|
|
|
|
systemd = {
|
2024-07-07 10:53:17 -04:00
|
|
|
services = {
|
|
|
|
plex_permission = {
|
|
|
|
description = "maintains /zfs/storage/plex permissions";
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
2024-07-07 19:09:48 -04:00
|
|
|
Environment = "WEBHOOK_URL=test";
|
2024-07-07 10:53:17 -04:00
|
|
|
ExecStart = "${pkgs.bash}/bin/bash ${./scripts/plex_permission.sh}";
|
|
|
|
};
|
|
|
|
};
|
2024-07-07 12:38:55 -04:00
|
|
|
startup_validation = {
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
description = "validates startup";
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
|
|
|
ExecStart = "${inputs.server_tools.packages.x86_64-linux.default}/bin/validate_jeeves";
|
|
|
|
};
|
2024-06-22 12:40:50 -04:00
|
|
|
};
|
|
|
|
};
|
2024-07-07 10:53:17 -04:00
|
|
|
timers = {
|
|
|
|
plex_permission = {
|
|
|
|
wantedBy = [ "timers.target" ];
|
|
|
|
timerConfig = {
|
|
|
|
OnBootSec = "1h";
|
|
|
|
OnCalendar = "daily 03:00";
|
|
|
|
Unit = "plex_permission.service";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
startup_validation = {
|
|
|
|
wantedBy = [ "timers.target" ];
|
|
|
|
timerConfig = {
|
|
|
|
OnBootSec = "10min";
|
|
|
|
Unit = "startup_validation.service";
|
|
|
|
};
|
2024-06-22 12:40:50 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|