blob: 189f8cc569a6ce5a0a8aaea6ad866a6153dd1a94 [file] [log] [blame]
Skyler Grey2ca6ccd2023-10-14 22:56:43 +00001{ pkgs, helpers, config, lib, ... }: {
2 clicks.nginx.services = with helpers.nginx; [
3 (Host "signup.hopescaramels.com" (ReverseProxy "CodedPi.local:3035"))
4 (Host "homebridge.coded.codes" (ReverseProxy "CodedPi.local:8581"))
5 (Host "codedpc.coded.codes" (ReverseProxy "SamuelDesktop.local:3389"))
6 (Host "testing.coded.codes" (ReverseProxy "SamuelDesktop.local:3000"))
7 (Hosts [ "kavita.coded.codes" "reading.coded.codes" ]
Skyler Greyd550aab2023-10-22 22:57:50 +00008 (ReverseProxy "127.0.0.1:5000"))
Skyler Greyfe1740c2023-10-21 01:24:18 +00009 (Host "www.clicks.codes"
10 (RedirectPermanent "https://clicks.codes$request_uri"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000011 (Host "clicks.codes" (ReverseProxy "127.0.0.1:3000"))
Skyler Greyd550aab2023-10-22 22:57:50 +000012 (Host "passwords.clicks.codes" (ReverseProxy "127.0.0.1:8452"))
13 (Host "login.clicks.codes" (ReverseProxy "127.0.0.1:9083"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000014 (Hosts [
15 "syncthing.clicks.codes"
16 "syncthing.coded.codes"
17 "syncthing.thecoded.prof"
18 "syncthing.hopescaramels.com"
Skyler Greyd550aab2023-10-22 22:57:50 +000019 ] (ReverseProxy "127.0.0.1:8384"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000020 (Hosts [ "gerrit.clicks.codes" "git.clicks.codes" ]
21 (ReverseProxy "127.0.0.255:1000"))
22 (Hosts [ "grafana.clicks.codes" "logs.clicks.codes" ]
Skyler Greyd550aab2023-10-22 22:57:50 +000023 (ReverseProxy "127.0.0.1:9052"))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000024 (InsecureHosts [
25 "mail.clicks.codes"
26 "mail.coded.codes"
27 "mail.hopescaramels.com"
28 "autoconfig.coded.codes"
29 "autoconfig.clicks.codes"
30 "autoconfig.hopescaramels.com"
31 "imap.coded.codes"
32 "imap.clicks.codes"
33 "imap.hopescaramels.com"
34 "pop.coded.codes"
35 "pop.clicks.codes"
36 "pop.hopescaramels.com"
37 "smtp.coded.codes"
38 "smtp.clicks.codes"
39 "smtp.hopescaramels.com"
Skyler Grey56b293d2023-10-22 22:53:34 +000040 ] (ReverseProxy "127.0.0.1:1080"))
Skyler Greyfe1740c2023-10-21 01:24:18 +000041 (Host "matrix.coded.codes" (Directory "${builtins.toString
42 (pkgs.schildichat-web.override {
43 conf = {
44 default_server_config =
45 lib.pipe ./nginx/coded.codes/.well-known/matrix [
46 builtins.readFile
47 builtins.fromJSON
48 ];
49 features = {
50 feature_report_to_moderators = true;
51 feature_latex_maths = true;
52 feature_pinning = true;
53 feature_mjolnir = true;
54 feature_presence_in_room_list = true;
55 feature_custom_themes = true;
56 feature_dehydration = true;
57 };
58 setting_defaults = { "fallbackICEServerAllowed" = true; };
59 default_theme = "dark";
60 permalink_prefix = "https://matrix.coded.codes";
61 disable_guests = true;
62 disable_3pid_login = true;
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000063 };
Skyler Greyfe1740c2023-10-21 01:24:18 +000064 })}"))
65 (Host "api.clicks.codes"
Skyler Greyd550aab2023-10-22 22:57:50 +000066 (Path "/nucleus/" (ReverseProxy "127.0.0.1:10000")))
Skyler Greyfe1740c2023-10-21 01:24:18 +000067 (Host "api.coded.codes"
68 (Path "/nucleus/" (ReverseProxy "SamuelDesktop.local:10000")))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000069 (Host "coded.codes" (Compose [
Skyler Greyfe1740c2023-10-21 01:24:18 +000070 (Path "/.well-known/matrix/"
71 (File ./nginx/coded.codes/.well-known/matrix))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000072 (Redirect "https://clicks.codes$request_uri")
73 ]))
74 (Host "matrix-backend.coded.codes" (Compose [
75 (Path "/_synapse/admin/" (Status 403))
Skyler Greyd550aab2023-10-22 22:57:50 +000076 (ReverseProxy "127.0.0.1:4527")
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000077 ]))
78 ];
79 clicks.nginx.serviceAliases = with helpers.nginx; [
80 (Aliases "nextcloud.clicks.codes" [
81 "cloud.clicks.codes"
82 "docs.clicks.codes"
83 ])
84 (Aliases "privatebin" [
85 "paste.clicks.codes"
86 "paste.coded.codes"
87 "paste.thecoded.prof"
88 "paste.hopescaramels.com"
89 ])
90 ];
91 clicks.nginx.streams = with helpers.nginx; [
Skyler Grey56b293d2023-10-22 22:53:34 +000092 (ProxyStream 143 "127.0.0.1:1143" "tcp") # imap
93 (ProxyStream 993 "127.0.0.1:1993" "tcp") # imap
94 (ProxyStream 110 "127.0.0.1:1110" "tcp") # pop3
95 (ProxyStream 995 "127.0.0.1:1995" "tcp") # pop3
96 (ProxyStream 25 "127.0.0.1:1025" "tcp") # smtp
97 (ProxyStream 465 "127.0.0.1:1465" "tcp") # smtp
98 (ProxyStream 587 "127.0.0.1:1587" "tcp") # smtp
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000099 ];
100}