Skyler Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 1 | { 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 Grey | d550aab | 2023-10-22 22:57:50 +0000 | [diff] [blame^] | 8 | (ReverseProxy "127.0.0.1:5000")) |
Skyler Grey | fe1740c | 2023-10-21 01:24:18 +0000 | [diff] [blame] | 9 | (Host "www.clicks.codes" |
| 10 | (RedirectPermanent "https://clicks.codes$request_uri")) |
Skyler Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 11 | (Host "clicks.codes" (ReverseProxy "127.0.0.1:3000")) |
Skyler Grey | d550aab | 2023-10-22 22:57:50 +0000 | [diff] [blame^] | 12 | (Host "passwords.clicks.codes" (ReverseProxy "127.0.0.1:8452")) |
| 13 | (Host "login.clicks.codes" (ReverseProxy "127.0.0.1:9083")) |
Skyler Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 14 | (Hosts [ |
| 15 | "syncthing.clicks.codes" |
| 16 | "syncthing.coded.codes" |
| 17 | "syncthing.thecoded.prof" |
| 18 | "syncthing.hopescaramels.com" |
Skyler Grey | d550aab | 2023-10-22 22:57:50 +0000 | [diff] [blame^] | 19 | ] (ReverseProxy "127.0.0.1:8384")) |
Skyler Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 20 | (Hosts [ "gerrit.clicks.codes" "git.clicks.codes" ] |
| 21 | (ReverseProxy "127.0.0.255:1000")) |
| 22 | (Hosts [ "grafana.clicks.codes" "logs.clicks.codes" ] |
Skyler Grey | d550aab | 2023-10-22 22:57:50 +0000 | [diff] [blame^] | 23 | (ReverseProxy "127.0.0.1:9052")) |
Skyler Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 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" |
Skyler Grey | 56b293d | 2023-10-22 22:53:34 +0000 | [diff] [blame] | 40 | ] (ReverseProxy "127.0.0.1:1080")) |
Skyler Grey | fe1740c | 2023-10-21 01:24:18 +0000 | [diff] [blame] | 41 | (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 Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 63 | }; |
Skyler Grey | fe1740c | 2023-10-21 01:24:18 +0000 | [diff] [blame] | 64 | })}")) |
| 65 | (Host "api.clicks.codes" |
Skyler Grey | d550aab | 2023-10-22 22:57:50 +0000 | [diff] [blame^] | 66 | (Path "/nucleus/" (ReverseProxy "127.0.0.1:10000"))) |
Skyler Grey | fe1740c | 2023-10-21 01:24:18 +0000 | [diff] [blame] | 67 | (Host "api.coded.codes" |
| 68 | (Path "/nucleus/" (ReverseProxy "SamuelDesktop.local:10000"))) |
Skyler Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 69 | (Host "coded.codes" (Compose [ |
Skyler Grey | fe1740c | 2023-10-21 01:24:18 +0000 | [diff] [blame] | 70 | (Path "/.well-known/matrix/" |
| 71 | (File ./nginx/coded.codes/.well-known/matrix)) |
Skyler Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 72 | (Redirect "https://clicks.codes$request_uri") |
| 73 | ])) |
| 74 | (Host "matrix-backend.coded.codes" (Compose [ |
| 75 | (Path "/_synapse/admin/" (Status 403)) |
Skyler Grey | d550aab | 2023-10-22 22:57:50 +0000 | [diff] [blame^] | 76 | (ReverseProxy "127.0.0.1:4527") |
Skyler Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 77 | ])) |
| 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 Grey | 56b293d | 2023-10-22 22:53:34 +0000 | [diff] [blame] | 92 | (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 Grey | 2ca6ccd | 2023-10-14 22:56:43 +0000 | [diff] [blame] | 99 | ]; |
| 100 | } |