blob: 4b56fc397278beb56984e81e7759d33e0dd40ded [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 Greyfe1740c2023-10-21 01:24:18 +000010 (Host "www.clicks.codes"
11 (RedirectPermanent "https://clicks.codes$request_uri"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000012 (Host "clicks.codes" (ReverseProxy "127.0.0.1:3000"))
Skyler Greyd550aab2023-10-22 22:57:50 +000013 (Host "passwords.clicks.codes" (ReverseProxy "127.0.0.1:8452"))
14 (Host "login.clicks.codes" (ReverseProxy "127.0.0.1:9083"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000015 (Hosts [
16 "syncthing.clicks.codes"
17 "syncthing.coded.codes"
18 "syncthing.thecoded.prof"
19 "syncthing.hopescaramels.com"
Skyler Greyd550aab2023-10-22 22:57:50 +000020 ] (ReverseProxy "127.0.0.1:8384"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000021 (Hosts [ "gerrit.clicks.codes" "git.clicks.codes" ]
22 (ReverseProxy "127.0.0.255:1000"))
23 (Hosts [ "grafana.clicks.codes" "logs.clicks.codes" ]
Skyler Greyd550aab2023-10-22 22:57:50 +000024 (ReverseProxy "127.0.0.1:9052"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000025 (InsecureHosts [
26 "mail.clicks.codes"
27 "mail.coded.codes"
28 "mail.hopescaramels.com"
29 "autoconfig.coded.codes"
30 "autoconfig.clicks.codes"
31 "autoconfig.hopescaramels.com"
32 "imap.coded.codes"
33 "imap.clicks.codes"
34 "imap.hopescaramels.com"
35 "pop.coded.codes"
36 "pop.clicks.codes"
37 "pop.hopescaramels.com"
38 "smtp.coded.codes"
39 "smtp.clicks.codes"
40 "smtp.hopescaramels.com"
Skyler Grey56b293d2023-10-22 22:53:34 +000041 ] (ReverseProxy "127.0.0.1:1080"))
Skyler Greyfe1740c2023-10-21 01:24:18 +000042 (Host "matrix.coded.codes" (Directory "${builtins.toString
43 (pkgs.schildichat-web.override {
44 conf = {
45 default_server_config =
46 lib.pipe ./nginx/coded.codes/.well-known/matrix [
47 builtins.readFile
48 builtins.fromJSON
49 ];
50 features = {
51 feature_report_to_moderators = true;
52 feature_latex_maths = true;
53 feature_pinning = true;
54 feature_mjolnir = true;
55 feature_presence_in_room_list = true;
56 feature_custom_themes = true;
57 feature_dehydration = true;
58 };
59 setting_defaults = { "fallbackICEServerAllowed" = true; };
60 default_theme = "dark";
61 permalink_prefix = "https://matrix.coded.codes";
62 disable_guests = true;
63 disable_3pid_login = true;
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000064 };
Skyler Greyfe1740c2023-10-21 01:24:18 +000065 })}"))
66 (Host "api.clicks.codes"
Skyler Greyd550aab2023-10-22 22:57:50 +000067 (Path "/nucleus/" (ReverseProxy "127.0.0.1:10000")))
Skyler Greyfe1740c2023-10-21 01:24:18 +000068 (Host "api.coded.codes"
69 (Path "/nucleus/" (ReverseProxy "SamuelDesktop.local:10000")))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000070 (Host "coded.codes" (Compose [
Skyler Greyfe1740c2023-10-21 01:24:18 +000071 (Path "/.well-known/matrix/"
72 (File ./nginx/coded.codes/.well-known/matrix))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000073 (Redirect "https://clicks.codes$request_uri")
74 ]))
75 (Host "matrix-backend.coded.codes" (Compose [
76 (Path "/_synapse/admin/" (Status 403))
Skyler Greyd550aab2023-10-22 22:57:50 +000077 (ReverseProxy "127.0.0.1:4527")
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000078 ]))
79 ];
80 clicks.nginx.serviceAliases = with helpers.nginx; [
81 (Aliases "nextcloud.clicks.codes" [
82 "cloud.clicks.codes"
83 "docs.clicks.codes"
84 ])
85 (Aliases "privatebin" [
86 "paste.clicks.codes"
87 "paste.coded.codes"
88 "paste.thecoded.prof"
89 "paste.hopescaramels.com"
90 ])
91 ];
92 clicks.nginx.streams = with helpers.nginx; [
Skyler Grey56b293d2023-10-22 22:53:34 +000093 (ProxyStream 143 "127.0.0.1:1143" "tcp") # imap
94 (ProxyStream 993 "127.0.0.1:1993" "tcp") # imap
95 (ProxyStream 110 "127.0.0.1:1110" "tcp") # pop3
96 (ProxyStream 995 "127.0.0.1:1995" "tcp") # pop3
97 (ProxyStream 25 "127.0.0.1:1025" "tcp") # smtp
98 (ProxyStream 465 "127.0.0.1:1465" "tcp") # smtp
99 (ProxyStream 587 "127.0.0.1:1587" "tcp") # smtp
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000100 ];
101}