1
0
Fork 0
dotfiles/container/tubearchivist/default.nix

63 lines
1.6 KiB
Nix
Raw Normal View History

2023-04-20 13:28:33 +00:00
{ lib, config, ... }:
2023-04-20 13:02:34 +00:00
{
systemd.tmpfiles.rules = [
"d /var/lib/tubearchivist 0755 root root"
"d /var/lib/tubearchivist/redis 0755 root root"
2023-04-20 14:24:18 +00:00
"d /var/lib/tubearchivist/es 0755 1000 root"
2023-04-20 13:02:34 +00:00
];
2023-04-20 13:12:26 +00:00
virtualisation.oci-containers.containers = {
2023-04-20 13:21:57 +00:00
tubearchivist = {
image = "docker.io/bbilly1/tubearchivist:latest";
dependsOn = [ "archivist-es" "archivist-redis" ];
ports = [ "127.0.0.1:9887:8000" ];
environmentFiles = [ config.age.secrets.tubearchivist-environment-ta.path ];
volumes = [
"/mnt/media/YTDL/Downloads:/youtube"
"/mnt/media/YTDL/Cache:/cache"
];
};
2023-04-20 13:12:26 +00:00
archivist-redis = {
image = "docker.io/redis/redis-stack-server:latest";
volumes = [
"/var/lib/tubearchivist/redis:/data"
];
};
archivist-es = {
image = "docker.io/bbilly1/tubearchivist-es:latest";
environmentFiles = [ config.age.secrets.tubearchivist-environment-es.path ];
volumes = [
"/var/lib/tubearchivist/es:/usr/share/elasticsearch/data"
];
};
};
2023-04-20 13:28:33 +00:00
systemd.services.podman-tubearchivist.serviceConfig = {
2023-04-20 14:24:18 +00:00
TimeoutStopSec = lib.mkForce 30;
2023-04-20 13:28:33 +00:00
};
systemd.services.podman-archivist-redis.serviceConfig = {
2023-04-20 14:24:18 +00:00
TimeoutStopSec = lib.mkForce 30;
2023-04-20 13:28:33 +00:00
};
systemd.services.podman-archivist-es.serviceConfig = {
2023-04-20 14:24:18 +00:00
TimeoutStopSec = lib.mkForce 30;
2023-04-20 13:28:33 +00:00
};
2023-04-20 14:34:40 +00:00
services.nginx.virtualHosts."tubearchivist.internal.kempkens.network" = {
quic = true;
http3 = true;
onlySSL = true;
useACMEHost = "internal.kempkens.network";
locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://127.0.0.1:9887";
};
};
2023-04-20 13:02:34 +00:00
}