blob: 889a17c84fc4d31626797cc74011cd91cd589751 [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"))
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"))
12 (Host "passwords.clicks.codes" (ReverseProxy "localhost:8452"))
13 (Host "login.clicks.codes" (ReverseProxy "localhost:9083"))
14 (Hosts [
15 "syncthing.clicks.codes"
16 "syncthing.coded.codes"
17 "syncthing.thecoded.prof"
18 "syncthing.hopescaramels.com"
19 ] (ReverseProxy "localhost:8384"))
20 (Hosts [ "gerrit.clicks.codes" "git.clicks.codes" ]
21 (ReverseProxy "127.0.0.255:1000"))
22 (Hosts [ "grafana.clicks.codes" "logs.clicks.codes" ]
23 (ReverseProxy "localhost:9052"))
24 (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"
40 ] (ReverseProxy "localhost:1080"))
Skyler Greyfe1740c2023-10-21 01:24:18 +000041 (Hosts [ "mail.clicks.codes" "mail.coded.codes" "mail.hopescaramels.com" ]
42 (ReverseProxy "localhost:1080"))
43 (Host "matrix.coded.codes" (Directory "${builtins.toString
44 (pkgs.schildichat-web.override {
45 conf = {
46 default_server_config =
47 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;
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000065 };
Skyler Greyfe1740c2023-10-21 01:24:18 +000066 })}"))
67 (Host "api.clicks.codes"
68 (Path "/nucleus/" (ReverseProxy "localhost:10000")))
69 (Host "api.coded.codes"
70 (Path "/nucleus/" (ReverseProxy "SamuelDesktop.local:10000")))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000071 (Host "coded.codes" (Compose [
Skyler Greyfe1740c2023-10-21 01:24:18 +000072 (Path "/.well-known/matrix/"
73 (File ./nginx/coded.codes/.well-known/matrix))
Skyler Grey2ca6ccd2023-10-14 22:56:43 +000074 (Redirect "https://clicks.codes$request_uri")
75 ]))
76 (Host "matrix-backend.coded.codes" (Compose [
77 (Path "/_synapse/admin/" (Status 403))
78 (ReverseProxy "localhost:4527")
79 ]))
80 ];
81 clicks.nginx.serviceAliases = with helpers.nginx; [
82 (Aliases "nextcloud.clicks.codes" [
83 "cloud.clicks.codes"
84 "docs.clicks.codes"
85 ])
86 (Aliases "privatebin" [
87 "paste.clicks.codes"
88 "paste.coded.codes"
89 "paste.thecoded.prof"
90 "paste.hopescaramels.com"
91 ])
92 ];
93 clicks.nginx.streams = with helpers.nginx; [
Skyler Greyfe1740c2023-10-21 01:24:18 +000094 (Stream 143 "localhost:1143" "tcp") # imap
95 (Stream 993 "localhost:1993" "tcp") # imap
96 (Stream 110 "localhost:1110" "tcp") # pop3
97 (Stream 995 "localhost:1995" "tcp") # pop3
98 (Stream 25 "localhost:1025" "tcp") # smtp
99 (Stream 465 "localhost:1465" "tcp") # smtp
100 (Stream 587 "localhost:1587" "tcp") # smtp
Skyler Grey2ca6ccd2023-10-14 22:56:43 +0000101 ];
102}