switch to native nix-based media servers

This commit is contained in:
Yan Lin 2025-11-27 19:41:39 +01:00
parent 68a56c55d2
commit d36c537dc8
4 changed files with 86 additions and 89 deletions

View file

@ -98,43 +98,6 @@ in
autoStart = true;
};
# Jellyfin media server
jellyfin = {
image = "docker.io/linuxserver/jellyfin:latest";
volumes = [
"/var/lib/containers/config/jellyfin:/config"
"/mnt/storage/Media:/data"
];
labels = {
"traefik.enable" = "true";
"traefik.http.routers.jellyfin.rule" = "Host(`jellyfin.${config.networking.hostName}.yanlincs.com`)";
"traefik.http.routers.jellyfin.entrypoints" = "websecure";
"traefik.http.routers.jellyfin.tls" = "true";
"traefik.http.routers.jellyfin.tls.certresolver" = "cloudflare";
"traefik.http.routers.jellyfin.tls.domains[0].main" = "*.${config.networking.hostName}.yanlincs.com";
"traefik.http.services.jellyfin.loadbalancer.server.port" = "8096";
};
environment = {
PUID = commonUID;
PGID = commonGID;
TZ = systemTZ;
};
ports = [
"5002:8096"
];
extraOptions = [
"--network=podman"
"--device=/dev/dri:/dev/dri" # Hardware acceleration
];
autoStart = true;
};
# qBittorrent torrent client
qbittorrent = {
image = "docker.io/linuxserver/qbittorrent:4.6.7";
@ -183,57 +146,5 @@ in
autoStart = true;
};
# Sonarr TV show management
sonarr = {
image = "docker.io/linuxserver/sonarr:latest";
volumes = [
"/var/lib/containers/config/sonarr:/config"
"/mnt/storage/Media:/data"
];
environment = {
PUID = commonUID;
PGID = commonGID;
TZ = systemTZ;
};
ports = [
"5003:8989"
];
extraOptions = [
"--network=podman"
];
autoStart = true;
};
# Radarr movie management
radarr = {
image = "docker.io/linuxserver/radarr:latest";
volumes = [
"/var/lib/containers/config/radarr:/config"
"/mnt/storage/Media:/data"
];
environment = {
PUID = commonUID;
PGID = commonGID;
TZ = systemTZ;
};
ports = [
"5004:7878"
];
extraOptions = [
"--network=podman"
];
autoStart = true;
};
};
}

View file

@ -16,6 +16,17 @@
};
};
jellyfin = {
rule = "Host(`jellyfin.${config.networking.hostName}.yanlincs.com`)";
service = "jellyfin";
tls = {
certResolver = "cloudflare";
domains = [{
main = "*.${config.networking.hostName}.yanlincs.com";
}];
};
};
};
services = {
@ -27,6 +38,14 @@
};
};
jellyfin = {
loadBalancer = {
servers = [{
url = "http://127.0.0.1:8096";
}];
};
};
};
};
};

View file

@ -10,6 +10,7 @@
../../../modules/borg/client.nix
../../../modules/login-display.nix
../../../modules/samba.nix
../../../modules/media-server.nix
];
# Automatic container updates
@ -274,4 +275,13 @@
user = "yanlin";
};
# Media server services
services.media-server = {
user = "yanlin";
sonarr.enable = true;
radarr.enable = true;
jellyfin.enable = true;
deluge.enable = true;
};
}