From 043062eac50e86623044f889031f40f0d6d3c081 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 5 May 2024 09:08:34 +0100 Subject: move servarr to laurel --- hosts/laurel/configuration.nix | 18 +++++++-- hosts/laurel/servarr.nix | 87 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 hosts/laurel/servarr.nix (limited to 'hosts') diff --git a/hosts/laurel/configuration.nix b/hosts/laurel/configuration.nix index 29864cf..ab05bc0 100644 --- a/hosts/laurel/configuration.nix +++ b/hosts/laurel/configuration.nix @@ -9,6 +9,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./servarr.nix ]; # Use the systemd-boot EFI boot loader. @@ -44,10 +45,19 @@ ]; }; - environment.systemPackages = with pkgs; [ - vim - wget - curl + environment.systemPackages = [ + pkgs.vim + pkgs.wget + pkgs.curl + + pkgs.jellyfin + pkgs.jellyfin-web + pkgs.jellyfin-ffmpeg + + pkgs.htop + pkgs.ripgrep + pkgs.git + ]; users.users.op = { diff --git a/hosts/laurel/servarr.nix b/hosts/laurel/servarr.nix new file mode 100644 index 0000000..8b5dd83 --- /dev/null +++ b/hosts/laurel/servarr.nix @@ -0,0 +1,87 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ]; + + services.transmission = { + enable = true; + openFirewall = true; + openRPCPort = true; + user = "torrent"; + settings = { + download-dir = "/torrents"; + incomplete-dir = "/.incomplete"; + rpc-bind-address = "0.0.0.0"; + rpc-whitelist = "127.0.0.1,10.0.0.1,192.168.*.*,100.64.*.*"; + }; + }; + services.nginx.virtualHosts."torrent.${config.networking.hostName}" = { + listen = [{ port = 80; addr = "0.0.0.0"; }]; + locations."/" = { + proxyPass = "http://127.0.0.1:9091"; + }; + }; + + services.sonarr = { + enable = true; + openFirewall = true; + user = "torrent"; + }; + services.nginx.virtualHosts."sonarr.${config.networking.hostName}" = { + listen = [{ port = 80; addr = "0.0.0.0"; }]; + locations."/" = { + proxyPass = "http://127.0.0.1:8989"; + }; + }; + + services.radarr = { + enable = true; + openFirewall = true; + user = "torrent"; + }; + services.nginx.virtualHosts."radarr.${config.networking.hostName}" = { + listen = [{ port = 80; addr = "0.0.0.0"; }]; + locations."/" = { + proxyPass = "http://127.0.0.1:7878"; + }; + }; + + services.bazarr = { + enable = true; + openFirewall = true; + user = "torrent"; + }; + services.nginx.virtualHosts."bazarr.${config.networking.hostName}" = { + listen = [{ port = 80; addr = "0.0.0.0"; }]; + locations."/" = { + proxyPass = "http://127.0.0.1:6767"; + }; + }; + + services.jackett = { + enable = true; + openFirewall = true; + user = "torrent"; + }; + services.nginx.virtualHosts."jackett.${config.networking.hostName}" = { + listen = [{ port = 80; addr = "0.0.0.0"; }]; + locations."/" = { + proxyPass = "http://127.0.0.1:9117"; + }; + }; + + services.lidarr = { + enable = true; + openFirewall = true; + user = "torrent"; + }; + services.nginx.virtualHosts."lidarr.${config.networking.hostName}" = { + listen = [{ port = 80; addr = "0.0.0.0"; }]; + locations."/" = { + proxyPass = "http://127.0.0.1:8686"; + }; + }; + +} + + -- cgit v1.2.3