add reboot-bot

This commit is contained in:
Gerg-L 2024-08-22 21:19:12 -04:00
parent 5fbaa89f08
commit 54d73305e4
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
4 changed files with 53 additions and 3 deletions

View file

@ -0,0 +1,21 @@
{
config,
lib,
reboot-bot,
}:
{
sops.secrets.reboot_token = { };
systemd.services.reboot_bot = {
wantedBy = [ "multi-user.target" ];
wants = [ "network-online.target" ];
after = [ "network-online.target" ];
serviceConfig = {
ExecStart = lib.getExe reboot-bot.packages.default;
EnvironmentFile = config.sops.secrets.reboot_token.path;
Restart = "on-failure";
RestartSec = "30s";
};
};
}