dotfiles.nix/nixos/viridian/containers/lidarr.nix

47 lines
1,012 B
Nix
Raw Normal View History

2024-08-08 09:02:42 +08:00
{...}: let
2024-06-16 23:08:52 +08:00
port = "8686";
2024-08-08 09:02:42 +08:00
in {
2024-01-23 09:45:42 +08:00
virtualisation.oci-containers.containers = {
# # Music collection manager for Usenet and BitTorrent users
lidarr = {
autoStart = true;
2024-08-11 20:05:27 +08:00
image = "ghcr.io/hotio/lidarr:release-2.4.3.4248";
2024-01-23 09:45:42 +08:00
ports = [
2024-06-16 23:08:52 +08:00
"${port}:8686/tcp" # WebUI
2024-01-23 09:45:42 +08:00
];
volumes = [
# Media library
"/srv/multimedia:/data:rw"
# Container data
"/srv/containers/lidarr:/config:rw"
];
2024-06-16 23:08:52 +08:00
environment = {
PUID = "1000";
PGID = "100";
};
2024-01-23 09:45:42 +08:00
extraOptions = [
"--network=media-stack"
];
};
};
services.traefik.dynamicConfigOptions.http.routers = {
lidarr = {
rule = "Host(`lidarr.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
2024-07-08 22:08:39 +08:00
"internal"
];
service = "lidarr";
};
};
services.traefik.dynamicConfigOptions.http.services = {
lidarr.loadBalancer.servers = [
2024-08-08 09:02:42 +08:00
{url = "http://127.0.0.1:${port}";}
];
};
2024-01-23 09:45:42 +08:00
}