From e149b8e16fee0a2473e531623dbc09b1d54c4282 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 16 Oct 2021 19:34:13 +0200 Subject: [PATCH] VEGAS: add FBI services --- hosts/VEGAS/services/fbi/default.nix | 24 ++++++++++++++++++++++++ hosts/VEGAS/system.nix | 1 + 2 files changed, 25 insertions(+) create mode 100644 hosts/VEGAS/services/fbi/default.nix diff --git a/hosts/VEGAS/services/fbi/default.nix b/hosts/VEGAS/services/fbi/default.nix new file mode 100644 index 0000000..f7f7be3 --- /dev/null +++ b/hosts/VEGAS/services/fbi/default.nix @@ -0,0 +1,24 @@ +{ config, lib, tools, ... }: +with tools.nginx; +{ + services = { + radarr = { + enable = true; + }; + sonarr = { + enable = true; + }; + ombi = { + enable = true; + port = 35000; + }; + + nginx.virtualHosts = mappers.mapSubdomains { + radarr = vhosts.proxy "http://127.0.0.1:7878"; + sonarr = vhosts.proxy "http://127.0.0.1:8989"; + fbi-requests = vhosts.proxy "http://127.0.0.1:${builtins.toString config.services.ombi.port}"; + }; + }; + systemd.services.radarr.serviceConfig.Slice = "mediamanagement.slice"; + systemd.services.sonarr.serviceConfig.Slice = "mediamanagement.slice"; +} diff --git a/hosts/VEGAS/system.nix b/hosts/VEGAS/system.nix index 9b021cd..39a6b10 100644 --- a/hosts/VEGAS/system.nix +++ b/hosts/VEGAS/system.nix @@ -16,6 +16,7 @@ # Services ./services/backbone-routing ./services/dns + ./services/fbi ] # TODO: fix users # ++ (import ../../users "server").groups.admin