summaryrefslogtreecommitdiff
path: root/Omni/Cloud/Web.nix
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Cloud/Web.nix')
-rw-r--r--Omni/Cloud/Web.nix102
1 files changed, 23 insertions, 79 deletions
diff --git a/Omni/Cloud/Web.nix b/Omni/Cloud/Web.nix
index 79886c3..b87da38 100644
--- a/Omni/Cloud/Web.nix
+++ b/Omni/Cloud/Web.nix
@@ -1,5 +1,6 @@
-{config, ...}: let
- rootDomain = config.networking.domain;
+{...}: let
+ # rootDomain = config.networking.domain;
+ rootDomain = "bensima.com";
ports = import ./Ports.nix;
in {
imports = [./Gmnisrv.nix];
@@ -86,7 +87,7 @@ in {
":tls" = {store = "/var/lib/gmnisrv";};
"bsima.me" = {"root" = "/var/web/ben";};
"${rootDomain}" = {
- "root" = "/var/web/simatime.com";
+ "root" = "/var/web/ben";
"cgi" = "on";
};
};
@@ -116,20 +117,29 @@ in {
serverName = rootDomain;
forceSSL = true;
enableACME = true;
+ serverAliases = [
+ "www.simatime.com"
+ "simatime.com"
+ "www.bsima.me"
+ "bsima.me"
+ "mail.bensima.com"
+ ];
locations = {
# nostr nip-5 verification
- "/.well-known/nostr.json".return = "200 '${
- builtins.toJSON {
- names.bensima = "2fa4b9ba71b6dab17c4723745bb7850dfdafcb6ae1a8642f76f9c64fa5f43436";
- }
- }'";
+ #"/.well-known/nostr.json".return = "200 '${
+ # builtins.toJSON {
+ # names.bensima = "2fa4b9ba71b6dab17c4723745bb7850dfdafcb6ae1a8642f76f9c64fa5f43436";
+ # }
+ #}'";
"/" = {
- root = "/var/web/simatime.com";
+ root = "/var/web/ben";
+ index = "index.html index.htm";
extraConfig = ''
autoindex on;
'';
};
- # serve /~$USER paths
+ # serve /~$USER paths, yeah i'm the only user, but whatever this
+ # trick might be useful someday
"~ ^/~(.+?)(/.*)?$" = {
alias = "/var/web/$1$2";
index = "index.html index.htm";
@@ -140,26 +150,6 @@ in {
};
};
- "bensima.com" = {
- locations."/" = {
- root = "/var/web/ben";
- index = "index.html index.htm";
- extraConfig = ''
- autoindex on;
- '';
- };
- serverAliases = [
- "www.bensima.com"
- "www.bsima.me"
- "bsima.me"
- ];
- forceSSL = true;
- useACMEHost = rootDomain;
- };
-
- # Monica virtual host configuration is handled by the Monica service
- # Don't add a manual entry here to avoid conflicts
-
"hoogle.${rootDomain}" = {
locations."/".proxyPass = "http://${ports.bensIp}:${toString ports.hoogle}";
forceSSL = true;
@@ -184,22 +174,6 @@ in {
'';
};
- "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;
@@ -216,27 +190,6 @@ in {
globalRedirect = "youtube.${rootDomain}";
};
- "dandel-rovbur.${rootDomain}" = {
- locations."/".proxyPass = "http://${ports.bensIp}:${toString ports.dandel-rovbur}";
- forceSSL = true;
- useACMEHost = rootDomain;
- };
-
- "sabten.${rootDomain}" = {
- locations."/".proxyPass = "http://localhost:${toString ports.sabten}";
- forceSSL = true;
- useACMEHost = rootDomain;
- };
-
- "sd.${rootDomain}" = {
- forceSSL = true;
- useACMEHost = rootDomain;
- locations."/" = {
- proxyPass = "http://${ports.bensIp}:${toString ports.stableDiffusion}";
- proxyWebsockets = true;
- };
- };
-
"music.${rootDomain}" = {
forceSSL = true;
useACMEHost = rootDomain;
@@ -257,7 +210,7 @@ in {
};
};
- "notebook.${rootDomain}" = {
+ "jupyter.${rootDomain}" = {
forceSSL = true;
useACMEHost = rootDomain;
locations = {
@@ -283,21 +236,12 @@ in {
group = "nginx";
# This must contain all of the other domains we host
extraDomainNames =
- ["bensima.com" "www.bensima.com" "bsima.me" "www.bsima.me"]
+ ["simatime.com" "www.simatime.com" "bsima.me" "www.bsima.me"]
++ map (sub: "${sub}.${rootDomain}") [
- "music"
"tv"
"hoogle"
- "dandel-rovbur"
- "sabten"
"cal"
- "notebook"
- "nostr"
- "youtube"
- "www.youtube"
- "m.youtube"
- "sd"
- "gerrit"
+ "jupyter"
"git"
"monica"
# xmpp stuff