2024-03-19 09:07:25 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
system,
|
2024-04-26 09:26:26 +00:00
|
|
|
pkgs,
|
2024-03-19 09:26:13 +00:00
|
|
|
...
|
2024-03-19 09:07:25 +00:00
|
|
|
}: {
|
|
|
|
users.users.yiffstash = {
|
|
|
|
group = "yiffstash";
|
|
|
|
isSystemUser = true;
|
|
|
|
};
|
|
|
|
users.groups.yiffstash = {};
|
|
|
|
|
|
|
|
systemd.services.yiffstash = {
|
2024-03-19 09:26:13 +00:00
|
|
|
enable = true;
|
2024-03-19 09:07:25 +00:00
|
|
|
description = "Post yiff to telegram";
|
|
|
|
serviceConfig = {
|
2024-04-26 09:26:26 +00:00
|
|
|
ExecStart = "/bin/sh ${pkgs.yiffstash}";
|
2024-03-19 09:07:25 +00:00
|
|
|
User = "yiffstash";
|
|
|
|
Group = "yiffstash";
|
|
|
|
Type = "oneshot";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
systemd.timers.yiffstash = {
|
|
|
|
enable = true;
|
|
|
|
description = "Post yiff to telegram";
|
|
|
|
requires = ["yiffstash.service"];
|
2024-03-19 09:26:13 +00:00
|
|
|
wantedBy = ["multi-user.target"];
|
2024-03-19 09:07:25 +00:00
|
|
|
timerConfig = {
|
|
|
|
OnUnitActiveSec = "30m";
|
|
|
|
RandomizedDelaySec = "1h";
|
|
|
|
};
|
|
|
|
};
|
2024-03-19 14:00:02 +00:00
|
|
|
sops.secrets."caroline/yiffstash/bot-token".owner = "yiffstash";
|
|
|
|
}
|