nixfiles/hosts/koi/containers/bots/pcre-sub-bot.nix

29 lines
661 B
Nix
Raw Normal View History

2024-11-23 16:37:34 +03:00
{ config, ... }:
2024-07-17 01:09:32 +03:00
let
UID = 1101;
in {
2024-11-23 16:37:34 +03:00
desu.secrets.pcresub-bot-env.owner = "pcre-sub-bot";
2024-07-17 01:09:32 +03:00
users.groups.pcre-sub-bot = {};
users.users.pcre-sub-bot = {
group = "pcre-sub-bot";
isNormalUser = true;
uid = UID;
};
virtualisation.oci-containers.containers.pcre-sub-bot = {
2024-08-04 02:24:50 +03:00
image = "ghcr.io/teidesu/pcre-sub-bot:latest";
2024-07-17 01:09:32 +03:00
environmentFiles = [
2024-11-23 16:37:34 +03:00
config.desu.secrets.pcresub-bot-env.path
2024-07-17 01:09:32 +03:00
];
user = builtins.toString UID;
2024-12-11 09:11:31 +03:00
extraOptions = [
"--mount=type=bind,source=/srv/pcre-sub-bot,target=/app/bot-data"
];
2024-07-17 01:09:32 +03:00
};
systemd.tmpfiles.rules = [
"d /srv/pcre-sub-bot 0777 pcre-sub-bot pcre-sub-bot -"
];
}