Add Tdarr transcoding manager for bulk H.264→HEVC conversion

Runs Tdarr server with internal node on the mediaserver for managing
library-wide re-encoding to save disk space. Web UI at tdarr.nordhammer.it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ediblerope 2026-04-15 10:17:09 +01:00
parent c8066a1ecb
commit 91c437de6d
3 changed files with 50 additions and 0 deletions

View file

@ -31,6 +31,7 @@
./services/fail2ban.nix ./services/fail2ban.nix
./services/authelia.nix ./services/authelia.nix
./services/homepage.nix ./services/homepage.nix
./services/tdarr.nix
./services/arr-interconnect.nix ./services/arr-interconnect.nix
]; ];

View file

@ -103,6 +103,7 @@ in
# --- Other --- # --- Other ---
"games.nordhammer.it" = proxy 8787; "games.nordhammer.it" = proxy 8787;
"search.nordhammer.it" = proxy 8087; "search.nordhammer.it" = proxy 8087;
"tdarr.nordhammer.it" = proxy 8265;
# --- Protected by Authelia --- # --- Protected by Authelia ---
"camera.nordhammer.it" = protectedProxy 1984; "camera.nordhammer.it" = protectedProxy 1984;

48
services/tdarr.nix Normal file
View file

@ -0,0 +1,48 @@
# services/tdarr.nix — Tdarr transcoding manager
{ config, pkgs, lib, ... }:
{
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
systemd.services.tdarr-server = {
description = "Tdarr Server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = "tdarr";
Group = "media";
StateDirectory = "tdarr";
ExecStart = "${pkgs.tdarr-server}/bin/tdarr-server";
Restart = "on-failure";
RestartSec = 10;
# Tdarr server config via environment
Environment = [
"HOME=/var/lib/tdarr"
"serverIP=0.0.0.0"
"serverPort=8266"
"webUIPort=8265"
"internalNode=true"
"inContainer=false"
"ffmpegVersion=6"
"nodeName=FredOS-Mediaserver"
];
};
};
users.users.tdarr = {
isSystemUser = true;
group = "media";
extraGroups = [ "media" "video" "render" ];
home = "/var/lib/tdarr";
};
systemd.tmpfiles.rules = [
"d /var/lib/tdarr 0755 tdarr media -"
"d /var/lib/tdarr/server 0755 tdarr media -"
"d /var/lib/tdarr/configs 0755 tdarr media -"
"d /var/lib/tdarr/logs 0755 tdarr media -"
];
};
}