TransPlace wiki: override favicon
There's not a way to change the favicon in the wiki directly, however by
using Compose and File we can override specific files to show the correct
icons. Therefore, we can overwrite the old favicons with our new ones
Co-Authored-By: Cleo Debeau <cleo@trans.gg>
Change-Id: I5a92b8f1211af23fc0b0abfba0dbd19ff059a5d0
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/633
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/common/nginx-routes.nix b/modules/common/nginx-routes.nix
index ff2cf0d..022dd3b 100644
--- a/modules/common/nginx-routes.nix
+++ b/modules/common/nginx-routes.nix
@@ -1,6 +1,35 @@
{ pkgs, helpers, config, lib, ... }: {
clicks.nginx.services = with helpers.nginx; [
- (Host "guide.trans.gg" (ReverseProxy "generic:1035"))
+ (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")
+ ]))
(Host "signup.hopescaramels.com" (ReverseProxy "caramels:1024"))
(Host "freeflowtaekwondo.com" (ReverseProxy "generic:1026"))
(Host "homebridge.coded.codes" (ReverseProxy "CodedPi:8581"))