summaryrefslogtreecommitdiff
path: root/Biz
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-10-12 12:31:11 -0400
committerBen Sima <ben@bsima.me>2022-10-12 12:31:11 -0400
commitcb0875d2ad2c69b9a8766a282eff0a65b1a4d21c (patch)
treeeab3472d670374246b05bc0e2ba064bb00a9f4e8 /Biz
parentc03f86b4c125602c51950217cf2b4b51b436a9e3 (diff)
Add libreddit and invidious services
Diffstat (limited to 'Biz')
-rw-r--r--Biz/Cloud/Ports.nix2
-rw-r--r--Biz/Cloud/Web.nix48
2 files changed, 50 insertions, 0 deletions
diff --git a/Biz/Cloud/Ports.nix b/Biz/Cloud/Ports.nix
index ace4cd7..63d8e3a 100644
--- a/Biz/Cloud/Ports.nix
+++ b/Biz/Cloud/Ports.nix
@@ -12,9 +12,11 @@
http = 80;
httpdev = { from = 8000; to = 8099; };
https = 443;
+ invidious = 8086;
jellyfin = 8096;
jupyter = 4000;
k3s = 6443;
+ libreddit = 8085;
mpd = 6600;
mpd-stream = 8097;
murmur = 64738;
diff --git a/Biz/Cloud/Web.nix b/Biz/Cloud/Web.nix
index 87a75da..2b3fd12 100644
--- a/Biz/Cloud/Web.nix
+++ b/Biz/Cloud/Web.nix
@@ -20,6 +20,22 @@ in
};
services = {
+
+ libreddit = {
+ enable = true;
+ address = "127.0.0.1";
+ openFirewall = true;
+ port = ports.libreddit;
+ };
+
+ invidious = {
+ enable = true;
+ database.createLocally = true;
+ domain = "youtube.${rootDomain}";
+ nginx.enable = false; # do this myself, below
+ port = ports.invidious;
+ };
+
radicale = {
enable = true;
settings = {
@@ -119,6 +135,33 @@ in
useACMEHost = rootDomain;
};
+ "reddit.${rootDomain}" = {
+ locations."/".proxyPass = "http://localhost:${toString ports.libreddit}";
+ forceSSL = true;
+ useACMEHost = rootDomain;
+ };
+ "www.reddit.${rootDomain}" = {
+ forceSSL = true;
+ useACMEHost = rootDomain;
+ globalRedirect = "reddit.${rootDomain}";
+ };
+ "old.reddit.${rootDomain}" = {
+ forceSSL = true;
+ useACMEHost = rootDomain;
+ globalRedirect = "reddit.${rootDomain}";
+ };
+
+ "youtube.${rootDomain}" = {
+ locations."/".proxyPass = "http://localhost:${toString ports.invidious}";
+ forceSSL = true;
+ useACMEHost = rootDomain;
+ };
+ "www.youtube.${rootDomain}" = {
+ forceSSL = true;
+ useACMEHost = rootDomain;
+ globalRedirect = "youtube.${rootDomain}";
+ };
+
"devalloc.io" = {
forceSSL = true;
useACMEHost = rootDomain;
@@ -189,5 +232,10 @@ in
"sabten"
"cal"
"notebook"
+ "reddit"
+ "old.reddit"
+ "www.reddit"
+ "youtube"
+ "www.youtube"
];
}