summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2024-04-25 23:50:15 -0400
committerJoe Mou <dev@mou.fo>2024-04-26 16:30:33 -0400
commit70dd3dc112bad9f5298789798d7d6a41b5384521 (patch)
tree8820c5d8b1a2aec1c600bfcd525fa61b513649bd
parent53e31ee94bf74011a3497999d65f8451f59327f6 (diff)
elmo: nzbget
-rw-r--r--hostnix/elmo/configuration.nix1
-rw-r--r--hostnix/elmo/usenet.nix52
2 files changed, 53 insertions, 0 deletions
diff --git a/hostnix/elmo/configuration.nix b/hostnix/elmo/configuration.nix
index b4dc7da..95eb5c6 100644
--- a/hostnix/elmo/configuration.nix
+++ b/hostnix/elmo/configuration.nix
@@ -9,6 +9,7 @@
./privacy-frontends.nix
./syncthing.nix
./system.nix
+ ./usenet.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
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" ];
+}