diff options
| author | Joe Mou <dev@mou.fo> | 2024-04-25 23:50:15 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2024-04-26 16:30:33 -0400 |
| commit | 70dd3dc112bad9f5298789798d7d6a41b5384521 (patch) | |
| tree | 8820c5d8b1a2aec1c600bfcd525fa61b513649bd /hostnix/elmo/usenet.nix | |
| parent | 53e31ee94bf74011a3497999d65f8451f59327f6 (diff) | |
elmo: nzbget
Diffstat (limited to 'hostnix/elmo/usenet.nix')
| -rw-r--r-- | hostnix/elmo/usenet.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/hostnix/elmo/usenet.nix b/hostnix/elmo/usenet.nix new file mode 100644 index 0000000..ab381a9 --- /dev/null +++ b/hostnix/elmo/usenet.nix @@ -0,0 +1,52 @@ +{ ... }: + +let + DestDir = "/srv/media/incoming"; +in +{ + systemd.tmpfiles.rules = [ + "d ${DestDir} 0775 nzbget nzbget" + ]; + + # Several low risk credentials are included. + services.nzbget = { + enable = true; + # Settings are passed as command line flags and not written to the config + # file. They will not show up in the web UI. + settings = { + inherit DestDir; + AppendCategoryDir = false; + # Also accepts a named pipe path, but wasn't able to set the permissions + # correctly. Trying socket activation failed with EADDRINUSE. + ControlIP = "::1"; + ControlPassword = ""; + + "Server1.Host" = "secure.news.thecubenet.com"; + "Server1.Port" = "563"; + "Server1.Encryption" = "yes"; + "Server1.Connections" = "20"; + "Server1.Username" = "spanommers+thecubenet99524"; + "Server1.Password" = "Wua8Dn57i3"; + + "Server2.Host" = "secure.news.thecubenet.com"; + "Server2.Port" = "563"; + "Server2.Encryption" = "yes"; + "Server2.Connections" = "20"; + "Server2.Username" = "spanommers+thecubenet99525"; + "Server2.Password" = "YWt4x47g9r"; + "Server2.Level" = 1; + + "Feed1.Name" = "nzbfinder"; + "Feed1.URL" = "https://nzbfinder.ws/rss/cart?dl=1&api_token=59f0e1aa3f25da0b76fee712a9ee0a16&del=1"; + "Feed1.Interval" = "0"; + }; + }; + + services.nginx.virtualHosts."ng.elmo.mou.fo" = { + enableACME = true; + forceSSL = true; + locations."/".proxyPass = "http://[::1]:6789"; + }; + + services.oauth2_proxy.nginx.virtualHosts = [ "ng.elmo.mou.fo" ]; +} |
