blob: af1de6b4e8b79ecdbe9deb4df7f62b428ed9ad9e [file] [log] [blame]
{ pkgs, helpers, config, lib, ... }: {
clicks.nginx.services = with helpers.nginx; [
(Host "clicks.domains" (ReverseProxy "192.168.0.2:80"))
(Host "guide.trans.gg" (Compose [
# PWA Manifest
(Path "/_assets/manifest.json"
(File ./nginx/guide.trans.gg/_assets/manifest.json))
# Browser Config
(Path "/_assets/favicons/browserconfig.xml"
(File ./nginx/guide.trans.gg/_assets/favicons/browserconfig.xml))
# Android Favicons
(Path "/_assets/favicons/android-chrome-192x192.png"
(File ./nginx/guide.trans.gg/_assets/favicons/android-chrome-192x192.png))
(Path "/_assets/favicons/android-chrome-256x256.png"
(File ./nginx/guide.trans.gg/_assets/favicons/android-chrome-256x256.png))
# Web Favicons
(Path "/_assets/favicons/favicon-16x16.png"
(File ./nginx/guide.trans.gg/_assets/favicons/favicon-16x16.png))
(Path "/_assets/favicons/favicon-32x32.png"
(File ./nginx/guide.trans.gg/_assets/favicons/favicon-32x32.png))
(Path "/_assets/favicons/mstile-150x150.png"
(File ./nginx/guide.trans.gg/_assets/favicons/mstile-150x150.png))
# iOS Favicons
(Path "/_assets/favicons/apple-touch-icon.png"
(File ./nginx/guide.trans.gg/_assets/favicons/apple-touch-icon.png))
(Path "/_assets/favicons/safari-pinned-tab.svg"
(File ./nginx/guide.trans.gg/_assets/favicons/safari-pinned-tab.svg))
(ReverseProxy "generic:1035")
]))
(SpecificHost "wiki.auxolotl.org" (ReverseProxy "10.0.101.2:1024")) # see aux.nix
(SpecificHost "docs.auxolotl.org" (Path ''~ ^/?([^\r\n]*)$'' (Redirect "https://wiki.auxolotl.org/$1")))
(Host "signup.hopescaramels.com" (ReverseProxy "caramels:1024"))
(Host "freeflowtaekwondo.com" (ReverseProxy "generic:1026"))
(Host "homebridge.coded.codes" (ReverseProxy "CodedPi:8581"))
(Host "codedpc.coded.codes" (ReverseProxy "SamuelDesktop:3389"))
(Host "testing.coded.codes" (ReverseProxy "SamuelDesktop:3000"))
(Host "clicks.codes" (Compose [
(Path "/.well-known/matrix/"
(CrossOrigin (File ./nginx/clicks.codes/.well-known/matrix)))
(ReverseProxy "127.0.0.1:3000")
]))
(Host "resume.thecoded.prof" (Directory "/var/www/thecoded.prof/sites/resume/dist/"))
(Host "thecoded.prof" (Directory "/var/www/thecoded.prof/sites/main/dist/"))
(Hosts [ "vaultwarden.clicks.codes" ] (ReverseProxy "generic:1028"))
(Hosts [ "passwords.clicks.codes" ] (RedirectPermanent "https://vaultwarden.clicks.codes"))
(Host "cloud.clicks.codes" (Path ''~ ^/?([^\r\n]*)$'' (RedirectPermanent "https://nextcloud.clicks.codes/$1")))
(Hosts [
"erpnext.clicks.codes"
"projects.clicks.codes"
"tasks.clicks.codes"
"issues.clicks.codes"
"kanban.clicks.codes"
"taiga.clicks.codes"
] (Redirect "https://frappe.clicks.codes/app"))
(Hosts [
"wiki.clicks.codes"
] (Redirect "https://frappe.clicks.codes/wiki"))
(Host "login.clicks.codes" (ReverseProxy "127.0.0.1:9083"))
(Hosts [ "gerrit.clicks.codes" "git.clicks.codes" ]
(ReverseProxy "generic:1024"))
(Hosts [ "grafana.clicks.codes" "logs.clicks.codes" ]
(ReverseProxy "127.0.0.1:9052"))
(InsecureHosts [
"mail.clicks.codes"
"mail.coded.codes"
"mail.hopescaramels.com"
"autoconfig.coded.codes"
"autoconfig.clicks.codes"
"autoconfig.hopescaramels.com"
"imap.coded.codes"
"imap.clicks.codes"
"imap.hopescaramels.com"
"pop.coded.codes"
"pop.clicks.codes"
"pop.hopescaramels.com"
"smtp.coded.codes"
"smtp.clicks.codes"
"smtp.hopescaramels.com"
] (ReverseProxy "generic:1026"))
(Hosts [
"calibre.coded.codes"
"books.coded.codes"
"reading.coded.codes"
"calibre.thecoded.prof"
"books.thecoded.prof"
"reading.thecoded.prof"
] (ReverseProxy "generic:1032"))
(Hosts ["matrix.clicks.codes" "matrix.coded.codes"] (Directory "${builtins.toString
(pkgs.element-web.override {
conf = {
default_server_config =
lib.pipe ./nginx/clicks.codes/.well-known/matrix [
builtins.readFile
builtins.fromJSON
];
features = {
feature_report_to_moderators = true;
feature_latex_maths = true;
feature_pinning = true;
feature_mjolnir = true;
feature_presence_in_room_list = true;
feature_custom_themes = true;
feature_dehydration = true;
};
setting_defaults = {
"fallbackICEServerAllowed" = true;
"UIFeature.passwordReset" = false;
"UIFeature.deactivate" = false;
};
show_labs_settings = true;
default_theme = "dark";
disable_guests = true;
disable_3pid_login = true;
logout_redirect_url = "https://login.clicks.codes/realms/master/protocol/openid-connect/logout?client_id=matrix";
sso_redirect_options.immediate = true;
};
})}"))
(Host "api.clicks.codes"
(Path "/nucleus/" (ReverseProxy "127.0.0.1:10000")))
(Host "api.coded.codes"
(Path "/nucleus/" (ReverseProxy "SamuelDesktop:10000")))
(Host "coded.codes" (Compose [
(Path "/.well-known/matrix/"
(CrossOrigin (File ./nginx/clicks.codes/.well-known/matrix)))
(Redirect "https://clicks.codes$request_uri")
]))
(Hosts ["matrix-backend.clicks.codes" "matrix-backend.coded.codes"] (Compose [
(Path "/_synapse/admin/" (Status 403))
(ReverseProxy "generic:1030")
]))
(Hosts ["matrix-sliding-sync.clicks.codes" "matrix-sliding-sync.coded.codes"]
(ReverseProxy "generic:1031"))
];
clicks.nginx.serviceAliases = with helpers.nginx; [
(Aliases "nextcloud.clicks.codes" [
"www.nextcloud.clicks.codes"
])
(Aliases "privatebin" [
"paste.clicks.codes"
"paste.coded.codes"
"paste.thecoded.prof"
"paste.hopescaramels.com"
"www.paste.clicks.codes"
"www.paste.coded.codes"
"www.paste.thecoded.prof"
"www.paste.hopescaramels.com"
"www.privatebin.clicks.codes"
])
];
}