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

64 lines
1.7 KiB
Nix
Raw Permalink 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"
2023-06-06 11:46:18 +00:00
"d /var/lib/tubearchivist/cache 0755 media_user media_group"
2023-04-20 13:02:34 +00:00
"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 = {
2024-09-08 20:18:38 +00:00
image = "docker.io/bbilly1/tubearchivist:v0.4.10";
2023-04-20 13:21:57 +00:00
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"
2023-06-06 11:46:18 +00:00
"/var/lib/tubearchivist/cache:/cache"
"/mnt/media/YTDL/Cache/backup:/cache/backup"
"/mnt/media/YTDL/Cache/import:/cache/import"
2023-04-20 13:21:57 +00:00
];
};
2023-04-20 13:12:26 +00:00
archivist-redis = {
2023-09-03 13:03:18 +00:00
image = "docker.io/redis/redis-stack-server:6.2.6-v9";
2023-04-20 13:12:26 +00:00
volumes = [
"/var/lib/tubearchivist/redis:/data"
];
};
archivist-es = {
image = "docker.io/bbilly1/tubearchivist-es:latest";
2023-05-14 10:55:01 +00:00
ports = [ "127.0.0.1:9200:9200" ];
2023-04-20 13:12:26 +00:00
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 =
let
mounts = [ "mnt-media-YTDL.mount" ];
in
{
requires = lib.mkAfter mounts;
after = lib.mkAfter mounts;
};
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
}