my terrible dotfiles
at main 87 lines 2.6 kB view raw
1{ config, lib, ... }: 2{ 3 forest.proxiedUsers = [ "prowlarr" ]; 4 5 sops = { 6 secrets = { 7 "prowlarr/apiKey" = { }; 8 "radarr/apiKey" = { }; 9 "sonarr/apiKey" = { }; 10 }; 11 templates = { 12 prowlarr-env.content = "PROWLARR__AUTH__APIKEY=${config.sops.placeholder."prowlarr/apiKey"}"; 13 radarr-env.content = "RADARR__AUTH__APIKEY=${config.sops.placeholder."radarr/apiKey"}"; 14 sonarr-env.content = "SONARR__AUTH__APIKEY=${config.sops.placeholder."sonarr/apiKey"}"; 15 }; 16 }; 17 18 services = { 19 prowlarr = { 20 enable = true; 21 openFirewall = true; 22 environmentFiles = [ config.sops.templates.prowlarr-env.path ]; 23 settings = { 24 log.level = "debug"; 25 server.bindaddress = "127.0.0.1"; 26 }; 27 }; 28 radarr = { 29 enable = true; 30 openFirewall = true; 31 environmentFiles = [ config.sops.templates.radarr-env.path ]; 32 settings = { 33 log.level = "debug"; 34 server.bindaddress = "127.0.0.1"; 35 }; 36 }; 37 sonarr = { 38 enable = true; 39 openFirewall = true; 40 environmentFiles = [ config.sops.templates.sonarr-env.path ]; 41 settings = { 42 log.level = "debug"; 43 server.bindaddress = "127.0.0.1"; 44 }; 45 }; 46 jellyseerr.enable = true; 47 }; 48 49 forest.nginxHosts = [ 50 (lib.mkIf config.services.sonarr.enable { 51 "sonarr.forest.monke" = { 52 onlySSL = true; 53 http2 = true; 54 sslCertificate = config.sops.secrets."ssl/cert".path; 55 sslCertificateKey = config.sops.secrets."ssl/key".path; 56 locations."/".proxyPass = "http://127.0.0.1:8989"; 57 }; 58 }) 59 (lib.mkIf config.services.radarr.enable { 60 "radarr.forest.monke" = { 61 onlySSL = true; 62 http2 = true; 63 sslCertificate = config.sops.secrets."ssl/cert".path; 64 sslCertificateKey = config.sops.secrets."ssl/key".path; 65 locations."/".proxyPass = "http://127.0.0.1:7878"; 66 }; 67 }) 68 (lib.mkIf config.services.prowlarr.enable { 69 "prowlarr.forest.monke" = { 70 onlySSL = true; 71 http2 = true; 72 sslCertificate = config.sops.secrets."ssl/cert".path; 73 sslCertificateKey = config.sops.secrets."ssl/key".path; 74 locations."/".proxyPass = "http://127.0.0.1:9696"; 75 }; 76 }) 77 (lib.mkIf config.services.jellyseerr.enable { 78 "reqs.forest.monke" = { 79 onlySSL = true; 80 http2 = true; 81 sslCertificate = config.sops.secrets."ssl/cert".path; 82 sslCertificateKey = config.sops.secrets."ssl/key".path; 83 locations."/".proxyPass = "http://127.0.0.1:5055"; 84 }; 85 }) 86 ]; 87}