blob: 918d6ddae8a64a86cf0e65ef0479cce965fa63a0 [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" ]
8 (ReverseProxy "localhost:5000"))
9 (Host "www.clicks.codes" (RedirectPermanent "https://clicks.codes$request_uri"))
10 (Host "clicks.codes" (ReverseProxy "127.0.0.1:3000"))
11 (Host "passwords.clicks.codes" (ReverseProxy "localhost:8452"))
12 (Host "login.clicks.codes" (ReverseProxy "localhost:9083"))
13 (Hosts [
14 "syncthing.clicks.codes"
15 "syncthing.coded.codes"
16 "syncthing.thecoded.prof"
17 "syncthing.hopescaramels.com"
18 ] (ReverseProxy "localhost:8384"))
19 (Hosts [ "gerrit.clicks.codes" "git.clicks.codes" ]
20 (ReverseProxy "127.0.0.255:1000"))
21 (Hosts [ "grafana.clicks.codes" "logs.clicks.codes" ]
22 (ReverseProxy "localhost:9052"))
23 (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"
39 ] (ReverseProxy "localhost:1080"))
40 (Hosts [
41 "mail.clicks.codes"
42 "mail.coded.codes"
43 "mail.hopescaramels.com"
44 ] (ReverseProxy "localhost:1080"))
45 (Host "matrix.coded.codes" (Directory "${builtins.toString (pkgs.schildichat-web.override {
46 conf = {
47 default_server_config = lib.pipe ./nginx/coded.codes/.well-known/matrix [
48 builtins.readFile
49 builtins.fromJSON
50 ];
51 features = {
52 feature_report_to_moderators = true;
53 feature_latex_maths = true;
54 feature_pinning = true;
55 feature_mjolnir = true;
56 feature_presence_in_room_list = true;
57 feature_custom_themes = true;
58 feature_dehydration = true;
59 };
60 setting_defaults = { "fallbackICEServerAllowed" = true; };
61 default_theme = "dark";
62 permalink_prefix = "https://matrix.coded.codes";
63 disable_guests = true;
64 disable_3pid_login = true;
65 };
66 })}"))
67 (Host "api.clicks.codes" (Path "/nucleus/" (ReverseProxy "localhost:10000")))
68 (Host "api.coded.codes" (Path "/nucleus/" (ReverseProxy "SamuelDesktop.local:10000")))
69 (Host "coded.codes" (Compose [
70 (Path "/.well-known/matrix/" (File ./nginx/coded.codes/.well-known/matrix))
71 (Redirect "https://clicks.codes$request_uri")
72 ]))
73 (Host "matrix-backend.coded.codes" (Compose [
74 (Path "/_synapse/admin/" (Status 403))
75 (ReverseProxy "localhost:4527")
76 ]))
77 ];
78 clicks.nginx.serviceAliases = with helpers.nginx; [
79 (Aliases "nextcloud.clicks.codes" [
80 "cloud.clicks.codes"
81 "docs.clicks.codes"
82 ])
83 (Aliases "privatebin" [
84 "paste.clicks.codes"
85 "paste.coded.codes"
86 "paste.thecoded.prof"
87 "paste.hopescaramels.com"
88 ])
89 ];
90 clicks.nginx.streams = with helpers.nginx; [
91 (Stream 143 "localhost:1143" "tcp") #imap
92 (Stream 993 "localhost:1993" "tcp") #imap
93 (Stream 110 "localhost:1110" "tcp") #pop3
94 (Stream 995 "localhost:1995" "tcp") #pop3
95 (Stream 25 "localhost:1025" "tcp") #smtp
96 (Stream 465 "localhost:1465" "tcp") #smtp
97 (Stream 587 "localhost:1587" "tcp") #smtp
98 ];
99}