infra/config/services/containers.nix

57 lines
1.5 KiB
Nix
Raw Normal View History

2023-05-06 06:49:46 +02:00
{config, ...}: let
ghcrLogin = {
registry = "ghcr.io";
username = "nekowinston";
passwordFile = config.age.secrets."containers/ghcr-token".path;
};
websitePort = "14139";
in {
2023-07-03 03:43:57 +02:00
virtualisation = {
podman = {
enable = true;
autoPrune = {
enable = true;
dates = "03:30";
2023-05-06 06:49:46 +02:00
};
};
2023-07-03 03:43:57 +02:00
oci-containers = {
backend = "podman";
containers = {
faerber-bot = {
image = "ghcr.io/nekowinston/faerber/faerber-discord-bot:latest";
environmentFiles = [config.age.secrets."containers/faerber.env".path];
2023-07-06 10:26:49 +02:00
extraOptions = ["-l=io.containers.autoupdate=registry"];
2023-07-03 03:43:57 +02:00
};
pepperjack = {
2023-07-05 01:30:18 +02:00
image = "ghcr.io/phasecorex/red-discordbot:latest";
2023-07-03 03:43:57 +02:00
environment = {
TOKEN = "~";
OWNER = "505490445468696576";
};
environmentFiles = [config.age.secrets."containers/pepperjack.env".path];
volumes = ["/srv/data-pepperjack:/data"];
2023-07-06 10:26:49 +02:00
extraOptions = ["-l=io.containers.autoupdate=registry"];
2023-07-03 03:43:57 +02:00
};
website = {
image = "ghcr.io/nekowinston/winston.sh/winston-sh:latest";
login = ghcrLogin;
ports = ["127.0.0.1:${websitePort}:3000"];
2023-07-06 10:26:49 +02:00
extraOptions = ["-l=io.containers.autoupdate=registry"];
2023-07-03 03:43:57 +02:00
};
};
2023-05-06 06:49:46 +02:00
};
};
services.nginx.virtualHosts."winston.sh" = {
locations."/".proxyPass = "http://127.0.0.1:${websitePort}";
forceSSL = true;
enableACME = false;
useACMEHost = "winston.sh";
};
}