stockholm/makefu/2configs/bureautomation/kalauerbot.nix

29 lines
745 B
Nix
Raw Normal View History

2020-09-16 20:23:16 +00:00
{ config, lib, pkgs, ... }:
2021-03-20 11:51:32 +00:00
let
oofdir = fetchTarball {
url = "https://o.euer.krebsco.de/s/AZn9QPLGFZeDfNq/download";
sha256 = "1wa59rkgffql6hbiw9vv0zh35wx9x1cp4bnwicprbd0kdxj75miz";
};
2020-09-16 20:23:16 +00:00
2021-03-20 11:51:32 +00:00
in
2020-09-16 20:23:16 +00:00
{
systemd.services.kalauerbot = {
description = "Kalauerbot";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
2021-03-20 11:51:32 +00:00
environment = import <secrets/bureautomation/citadel.nix> // {
"KALAUER_OOFDIR" = oofdir;
};
2020-09-16 20:23:16 +00:00
serviceConfig = {
DynamicUser = true;
StateDirectory = "kalauerbot";
WorkingDirectory = "/var/lib/kalauerbot";
ExecStart = "${pkgs.kalauerbot}/bin/kalauerbot";
PrivateTmp = true;
Restart = "always";
RuntimeMaxSec = "12h";
2020-09-16 20:23:16 +00:00
};
};
}