blob: a4af2a8ca154eb1b87eb708abe128d8198162330 [file] [log] [blame]
Skyler Grey2ca6ccd2023-10-14 22:56:43 +00001{ pkgs, helpers, config, lib, ... }: {
2 clicks.nginx.services = with helpers.nginx; [
Skyler Grey3c24fc02024-04-19 23:39:39 +00003 (Host "guide.trans.gg" (Compose [
4 # PWA Manifest
5 (Path "/_assets/manifest.json"
6 (File ./nginx/guide.trans.gg/_assets/manifest.json))
7 # Browser Config
8 (Path "/_assets/favicons/browserconfig.xml"
9 (File ./nginx/guide.trans.gg/_assets/favicons/browserconfig.xml))
10
11 # Android Favicons
12 (Path "/_assets/favicons/android-chrome-192x192.png"
13 (File ./nginx/guide.trans.gg/_assets/favicons/android-chrome-192x192.png))
14 (Path "/_assets/favicons/android-chrome-256x256.png"
15 (File ./nginx/guide.trans.gg/_assets/favicons/android-chrome-256x256.png))
16
17 # Web Favicons
18 (Path "/_assets/favicons/favicon-16x16.png"
19 (File ./nginx/guide.trans.gg/_assets/favicons/favicon-16x16.png))
20 (Path "/_assets/favicons/favicon-32x32.png"
21 (File ./nginx/guide.trans.gg/_assets/favicons/favicon-32x32.png))
22 (Path "/_assets/favicons/mstile-150x150.png"
23 (File ./nginx/guide.trans.gg/_assets/favicons/mstile-150x150.png))
24
25 # iOS Favicons
26 (Path "/_assets/favicons/apple-touch-icon.png"
27 (File ./nginx/guide.trans.gg/_assets/favicons/apple-touch-icon.png))
28 (Path "/_assets/favicons/safari-pinned-tab.svg"
29 (File ./nginx/guide.trans.gg/_assets/favicons/safari-pinned-tab.svg))
30
31 (ReverseProxy "generic:1035")
32 ]))
Skyler Greyf7eb4ae2024-05-06 12:38:44 +000033 (SpecificHost "wiki.auxolotl.org" (ReverseProxy "10.0.101.2:1024")) # see aux.nix
34 (SpecificHost "docs.auxolotl.org" (Path ''~ ^/?([^\r\n]*)$'' (Redirect "https://wiki.auxolotl.org/$1")))
TheCodedProfaf044562023-10-22 20:04:27 -040035 (Host "signup.hopescaramels.com" (ReverseProxy "caramels:1024"))
TheCodedProf1381cee2023-10-22 20:04:27 -040036 (Host "freeflowtaekwondo.com" (ReverseProxy "generic:1026"))
Skyler Grey18861122023-10-25 21:05:54 +000037 (Host "homebridge.coded.codes" (ReverseProxy "CodedPi:8581"))
38 (Host "codedpc.coded.codes" (ReverseProxy "SamuelDesktop:3389"))
39 (Host "testing.coded.codes" (ReverseProxy "SamuelDesktop:3000"))
Skyler Grey22428b02023-11-19 13:20:56 +000040 (Host "clicks.codes" (Compose [
41 (Path "/.well-known/matrix/"
Skyler Grey0de8a082023-11-21 22:45:29 +000042 (CrossOrigin (File ./nginx/clicks.codes/.well-known/matrix)))
Skyler Grey22428b02023-11-19 13:20:56 +000043 (ReverseProxy "127.0.0.1:3000")
44 ]))
Samuel Shuert50bbc8f2024-04-27 16:32:32 -040045 (Host "resume.thecoded.prof" (Directory "/var/www/thecoded.prof/sites/resume/dist/"))
46 (Host "thecoded.prof" (Directory "/var/www/thecoded.prof/sites/main/dist/"))
Skyler Grey82e09422024-03-10 14:11:44 +000047 (Hosts [ "vaultwarden.clicks.codes" ] (ReverseProxy "generic:1028"))
48 (Hosts [ "passwords.clicks.codes" ] (RedirectPermanent "https://vaultwarden.clicks.codes"))
Skyler Grey0ad45622024-04-18 10:40:44 +000049 (Host "cloud.clicks.codes" (Path ''~ ^/?([^\r\n]*)$'' (RedirectPermanent "https://nextcloud.clicks.codes/$1")))
Skyler Greyfc048592024-03-10 13:46:17 +000050 (Hosts [
51 "erpnext.clicks.codes"
52 "projects.clicks.codes"
53 "tasks.clicks.codes"
54 "issues.clicks.codes"
55 "kanban.clicks.codes"
56 "taiga.clicks.codes"
57 ] (Redirect "https://frappe.clicks.codes/app"))
Skyler Grey8720ed12024-03-10 13:59:44 +000058 (Hosts [
59 "wiki.clicks.codes"
60 ] (Redirect "https://frappe.clicks.codes/wiki"))
Skyler Greyd550aab2023-10-22 22:57:50 +000061 (Host "login.clicks.codes" (ReverseProxy "127.0.0.1:9083"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000062 (Hosts [ "gerrit.clicks.codes" "git.clicks.codes" ]
Skyler Grey22428b02023-11-19 13:20:56 +000063 (ReverseProxy "generic:1024"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000064 (Hosts [ "grafana.clicks.codes" "logs.clicks.codes" ]
Skyler Greyd550aab2023-10-22 22:57:50 +000065 (ReverseProxy "127.0.0.1:9052"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000066 (InsecureHosts [
67 "mail.clicks.codes"
68 "mail.coded.codes"
69 "mail.hopescaramels.com"
70 "autoconfig.coded.codes"
71 "autoconfig.clicks.codes"
72 "autoconfig.hopescaramels.com"
73 "imap.coded.codes"
74 "imap.clicks.codes"
75 "imap.hopescaramels.com"
76 "pop.coded.codes"
77 "pop.clicks.codes"
78 "pop.hopescaramels.com"
79 "smtp.coded.codes"
80 "smtp.clicks.codes"
81 "smtp.hopescaramels.com"
Skyler Grey22428b02023-11-19 13:20:56 +000082 ] (ReverseProxy "generic:1026"))
Skyler Grey58fbb972023-12-23 02:39:35 +000083 (Hosts [
84 "calibre.coded.codes"
85 "books.coded.codes"
86 "reading.coded.codes"
87 "calibre.thecoded.prof"
88 "books.thecoded.prof"
89 "reading.thecoded.prof"
90 ] (ReverseProxy "generic:1032"))
Skyler Grey22428b02023-11-19 13:20:56 +000091 (Hosts ["matrix.clicks.codes" "matrix.coded.codes"] (Directory "${builtins.toString
Skyler Grey1ea7dbd2023-12-23 00:08:32 +000092 (pkgs.element-web.override {
Skyler Greyfe1740c2023-10-21 01:24:18 +000093 conf = {
94 default_server_config =
Skyler Grey22428b02023-11-19 13:20:56 +000095 lib.pipe ./nginx/clicks.codes/.well-known/matrix [
Skyler Greyfe1740c2023-10-21 01:24:18 +000096 builtins.readFile
97 builtins.fromJSON
98 ];
99 features = {
100 feature_report_to_moderators = true;
101 feature_latex_maths = true;
102 feature_pinning = true;
103 feature_mjolnir = true;
104 feature_presence_in_room_list = true;
105 feature_custom_themes = true;
106 feature_dehydration = true;
107 };
Skyler Grey1ea7dbd2023-12-23 00:08:32 +0000108 setting_defaults = {
109 "fallbackICEServerAllowed" = true;
110 "UIFeature.passwordReset" = false;
111 "UIFeature.deactivate" = false;
112 };
113 show_labs_settings = true;
Skyler Greyfe1740c2023-10-21 01:24:18 +0000114 default_theme = "dark";
Skyler Greyfe1740c2023-10-21 01:24:18 +0000115 disable_guests = true;
116 disable_3pid_login = true;
Skyler Grey1ea7dbd2023-12-23 00:08:32 +0000117 logout_redirect_url = "https://login.clicks.codes/realms/master/protocol/openid-connect/logout?client_id=matrix";
118 sso_redirect_options.immediate = true;
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000119 };
Skyler Greyfe1740c2023-10-21 01:24:18 +0000120 })}"))
121 (Host "api.clicks.codes"
Skyler Greyd550aab2023-10-22 22:57:50 +0000122 (Path "/nucleus/" (ReverseProxy "127.0.0.1:10000")))
Skyler Greyfe1740c2023-10-21 01:24:18 +0000123 (Host "api.coded.codes"
Skyler Grey18861122023-10-25 21:05:54 +0000124 (Path "/nucleus/" (ReverseProxy "SamuelDesktop:10000")))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000125 (Host "coded.codes" (Compose [
Skyler Greyfe1740c2023-10-21 01:24:18 +0000126 (Path "/.well-known/matrix/"
Skyler Grey0de8a082023-11-21 22:45:29 +0000127 (CrossOrigin (File ./nginx/clicks.codes/.well-known/matrix)))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000128 (Redirect "https://clicks.codes$request_uri")
129 ]))
Skyler Grey75aa9492023-11-21 00:29:09 +0000130 (Hosts ["matrix-backend.clicks.codes" "matrix-backend.coded.codes"] (Compose [
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000131 (Path "/_synapse/admin/" (Status 403))
Skyler Grey7610ce42023-11-29 19:29:59 +0000132 (ReverseProxy "generic:1030")
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000133 ]))
Skyler Grey7610ce42023-11-29 19:29:59 +0000134 (Hosts ["matrix-sliding-sync.clicks.codes" "matrix-sliding-sync.coded.codes"]
135 (ReverseProxy "generic:1031"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000136 ];
137 clicks.nginx.serviceAliases = with helpers.nginx; [
138 (Aliases "nextcloud.clicks.codes" [
Skyler Greye15f5aa2023-10-25 17:13:43 +0000139 "www.nextcloud.clicks.codes"
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000140 ])
141 (Aliases "privatebin" [
142 "paste.clicks.codes"
143 "paste.coded.codes"
144 "paste.thecoded.prof"
145 "paste.hopescaramels.com"
Skyler Greye15f5aa2023-10-25 17:13:43 +0000146 "www.paste.clicks.codes"
147 "www.paste.coded.codes"
148 "www.paste.thecoded.prof"
149 "www.paste.hopescaramels.com"
150 "www.privatebin.clicks.codes"
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000151 ])
152 ];
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000153}