set up tdarr
This commit is contained in:
parent
23f2632837
commit
c84eef3218
4 changed files with 60 additions and 4 deletions
|
@ -27,6 +27,7 @@ let
|
||||||
"grafana.pepe" = hosts.pepe;
|
"grafana.pepe" = hosts.pepe;
|
||||||
"prometheus.pepe" = hosts.pepe;
|
"prometheus.pepe" = hosts.pepe;
|
||||||
"tts.pepe" = hosts.pepe;
|
"tts.pepe" = hosts.pepe;
|
||||||
|
"tdarr.pepe" = hosts.pepe;
|
||||||
};
|
};
|
||||||
network = "private";
|
network = "private";
|
||||||
in
|
in
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
./telegraf.nix
|
./telegraf.nix
|
||||||
|
|
||||||
./home-display.nix
|
./home-display.nix
|
||||||
|
./tdarr.nix
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,10 @@
|
||||||
mustache = "${pkgs.mustache-go}/bin/mustache";
|
mustache = "${pkgs.mustache-go}/bin/mustache";
|
||||||
jq = "${pkgs.jq}/bin/jq";
|
jq = "${pkgs.jq}/bin/jq";
|
||||||
index_html_template = refreshSeconds: pkgs.writeText "index_html.template" ''
|
index_html_template = refreshSeconds: pkgs.writeText "index_html.template" ''
|
||||||
<html>
|
<html>
|
||||||
<head><meta http-equiv="refresh" content="${toString refreshSeconds}"></head>
|
<head><meta http-equiv="refresh" content="${toString refreshSeconds}"></head>
|
||||||
<body>{{ date }}</body>
|
<body>{{ date }}</body>
|
||||||
</html>
|
</html>
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
54
nixos/machines/pepe/tdarr.nix
Normal file
54
nixos/machines/pepe/tdarr.nix
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
users.users.tdarr = {
|
||||||
|
isNormalUser = true;
|
||||||
|
group = "syncthing";
|
||||||
|
};
|
||||||
|
|
||||||
|
# https://docs.tdarr.io/docs/installation/docker/run-compose
|
||||||
|
virtualisation.oci-containers = {
|
||||||
|
backend = "podman";
|
||||||
|
containers.tdarr = {
|
||||||
|
volumes = [
|
||||||
|
"/srv/tdarr/server:/app/server"
|
||||||
|
"/srv/tdarr/configs:/app/configs"
|
||||||
|
"/srv/tdarr/logs:/app/logs"
|
||||||
|
"/srv/tdarr/transcode_cache:/temp"
|
||||||
|
"/media/syncthing/media:/media"
|
||||||
|
];
|
||||||
|
environment = {
|
||||||
|
serverIP = "0.0.0.0";
|
||||||
|
serverPort = "8266";
|
||||||
|
webUIPort = "8265";
|
||||||
|
internalNode = "false";
|
||||||
|
inContainer = "true";
|
||||||
|
nodeName = "ServerNode";
|
||||||
|
TZ = "Europe/London";
|
||||||
|
PGID = "237";
|
||||||
|
};
|
||||||
|
ports = [
|
||||||
|
"8265:8265" # WebUI
|
||||||
|
"8266:8266" # server port
|
||||||
|
];
|
||||||
|
image = "ghcr.io/haveagitgat/tdarr:latest"; # Warning: if the tag does not change, the image will not be updated
|
||||||
|
extraOptions = [ "--network=bridge" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8266 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 8266 ];
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."tdarr.pepe.private" = {
|
||||||
|
serverAliases = [ "tdarr.pepe" ];
|
||||||
|
extraConfig = ''
|
||||||
|
allow ${config.tinc.private.subnet};
|
||||||
|
deny all;
|
||||||
|
'';
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:8265";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue