nixfiles/hosts/koi/containers/bots/channel-logger-bot.nix

30 lines
787 B
Nix
Raw Normal View History

2024-11-23 16:37:34 +03:00
{ config, ... }:
2024-08-07 19:40:47 +03:00
let
UID = 1105;
in {
2024-11-23 16:37:34 +03:00
desu.secrets.channel-logger-bot-env.owner = "channel-logger-bot";
2024-08-07 19:40:47 +03:00
users.groups.channel-logger-bot = {};
users.users.channel-logger-bot = {
group = "channel-logger-bot";
isNormalUser = true;
uid = UID;
};
virtualisation.oci-containers.containers.channel-logger-bot = {
image = "ghcr.io/teidesu/channel-logger-bot:latest";
environmentFiles = [
2024-11-23 16:37:34 +03:00
config.desu.secrets.channel-logger-bot-env.path
2024-08-07 19:40:47 +03:00
];
environment.MTCUTE_LOG_LEVEL = "5";
user = builtins.toString UID;
2024-12-11 09:11:31 +03:00
extraOptions = [
"--mount=type=bind,source=/srv/channel-logger-bot,target=/app/bot-data"
];
2024-08-07 19:40:47 +03:00
};
systemd.tmpfiles.rules = [
"d /srv/channel-logger-bot 0755 ${builtins.toString UID} ${builtins.toString UID} -"
];
}