blob: a7eb810980e29d3dd8c8afa8b4df3db8342d6198 [file] [log] [blame]
Skyler Grey2ca6ccd2023-10-14 22:56:43 +00001{ pkgs, helpers, config, lib, ... }: {
2 clicks.nginx.services = with helpers.nginx; [
TheCodedProfaf044562023-10-22 20:04:27 -04003 (Host "signup.hopescaramels.com" (ReverseProxy "caramels:1024"))
TheCodedProf1381cee2023-10-22 20:04:27 -04004 (Host "freeflowtaekwondo.com" (ReverseProxy "generic:1026"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +00005 (Host "homebridge.coded.codes" (ReverseProxy "CodedPi.local:8581"))
6 (Host "codedpc.coded.codes" (ReverseProxy "SamuelDesktop.local:3389"))
7 (Host "testing.coded.codes" (ReverseProxy "SamuelDesktop.local:3000"))
8 (Hosts [ "kavita.coded.codes" "reading.coded.codes" ]
Skyler Greyd550aab2023-10-22 22:57:50 +00009 (ReverseProxy "127.0.0.1:5000"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000010 (Host "clicks.codes" (ReverseProxy "127.0.0.1:3000"))
Skyler Greyd550aab2023-10-22 22:57:50 +000011 (Host "passwords.clicks.codes" (ReverseProxy "127.0.0.1:8452"))
12 (Host "login.clicks.codes" (ReverseProxy "127.0.0.1:9083"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000013 (Hosts [
14 "syncthing.clicks.codes"
15 "syncthing.coded.codes"
16 "syncthing.thecoded.prof"
17 "syncthing.hopescaramels.com"
Skyler Greyd550aab2023-10-22 22:57:50 +000018 ] (ReverseProxy "127.0.0.1:8384"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000019 (Hosts [ "gerrit.clicks.codes" "git.clicks.codes" ]
20 (ReverseProxy "127.0.0.255:1000"))
21 (Hosts [ "grafana.clicks.codes" "logs.clicks.codes" ]
Skyler Greyd550aab2023-10-22 22:57:50 +000022 (ReverseProxy "127.0.0.1:9052"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000023 (InsecureHosts [
24 "mail.clicks.codes"
25 "mail.coded.codes"
26 "mail.hopescaramels.com"
27 "autoconfig.coded.codes"
28 "autoconfig.clicks.codes"
29 "autoconfig.hopescaramels.com"
30 "imap.coded.codes"
31 "imap.clicks.codes"
32 "imap.hopescaramels.com"
33 "pop.coded.codes"
34 "pop.clicks.codes"
35 "pop.hopescaramels.com"
36 "smtp.coded.codes"
37 "smtp.clicks.codes"
38 "smtp.hopescaramels.com"
Skyler Grey56b293d2023-10-22 22:53:34 +000039 ] (ReverseProxy "127.0.0.1:1080"))
Skyler Greyfe1740c2023-10-21 01:24:18 +000040 (Host "matrix.coded.codes" (Directory "${builtins.toString
41 (pkgs.schildichat-web.override {
42 conf = {
43 default_server_config =
44 lib.pipe ./nginx/coded.codes/.well-known/matrix [
45 builtins.readFile
46 builtins.fromJSON
47 ];
48 features = {
49 feature_report_to_moderators = true;
50 feature_latex_maths = true;
51 feature_pinning = true;
52 feature_mjolnir = true;
53 feature_presence_in_room_list = true;
54 feature_custom_themes = true;
55 feature_dehydration = true;
56 };
57 setting_defaults = { "fallbackICEServerAllowed" = true; };
58 default_theme = "dark";
59 permalink_prefix = "https://matrix.coded.codes";
60 disable_guests = true;
61 disable_3pid_login = true;
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000062 };
Skyler Greyfe1740c2023-10-21 01:24:18 +000063 })}"))
64 (Host "api.clicks.codes"
Skyler Greyd550aab2023-10-22 22:57:50 +000065 (Path "/nucleus/" (ReverseProxy "127.0.0.1:10000")))
Skyler Greyfe1740c2023-10-21 01:24:18 +000066 (Host "api.coded.codes"
67 (Path "/nucleus/" (ReverseProxy "SamuelDesktop.local:10000")))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000068 (Host "coded.codes" (Compose [
Skyler Greyfe1740c2023-10-21 01:24:18 +000069 (Path "/.well-known/matrix/"
70 (File ./nginx/coded.codes/.well-known/matrix))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000071 (Redirect "https://clicks.codes$request_uri")
72 ]))
73 (Host "matrix-backend.coded.codes" (Compose [
74 (Path "/_synapse/admin/" (Status 403))
Skyler Greyd550aab2023-10-22 22:57:50 +000075 (ReverseProxy "127.0.0.1:4527")
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000076 ]))
77 ];
78 clicks.nginx.serviceAliases = with helpers.nginx; [
79 (Aliases "nextcloud.clicks.codes" [
80 "cloud.clicks.codes"
81 "docs.clicks.codes"
Skyler Greye15f5aa2023-10-25 17:13:43 +000082 "www.cloud.clicks.codes"
83 "www.docs.clicks.codes"
84 "www.nextcloud.clicks.codes"
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000085 ])
86 (Aliases "privatebin" [
87 "paste.clicks.codes"
88 "paste.coded.codes"
89 "paste.thecoded.prof"
90 "paste.hopescaramels.com"
Skyler Greye15f5aa2023-10-25 17:13:43 +000091 "www.paste.clicks.codes"
92 "www.paste.coded.codes"
93 "www.paste.thecoded.prof"
94 "www.paste.hopescaramels.com"
95 "www.privatebin.clicks.codes"
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000096 ])
97 ];
98 clicks.nginx.streams = with helpers.nginx; [
Skyler Grey56b293d2023-10-22 22:53:34 +000099 (ProxyStream 143 "127.0.0.1:1143" "tcp") # imap
100 (ProxyStream 993 "127.0.0.1:1993" "tcp") # imap
101 (ProxyStream 110 "127.0.0.1:1110" "tcp") # pop3
102 (ProxyStream 995 "127.0.0.1:1995" "tcp") # pop3
103 (ProxyStream 25 "127.0.0.1:1025" "tcp") # smtp
104 (ProxyStream 465 "127.0.0.1:1465" "tcp") # smtp
105 (ProxyStream 587 "127.0.0.1:1587" "tcp") # smtp
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000106 ];
107}