From dc72926262999132d7da071fdf4111477d5eab63 Mon Sep 17 00:00:00 2001 From: buffet Date: Mon, 3 Jun 2024 15:36:01 +0200 Subject: [PATCH] refactor(forgejo): serve theme related files from a directory instead of adding overrides one by one --- hosts/ami/forgejo.nix | 11 +-- .../assets/img/favicon.svg} | 0 res/forgejo/assets/img/logo.svg | 77 +++++++++++++++++++ 3 files changed, 83 insertions(+), 5 deletions(-) rename res/{kitchen_logo.svg => forgejo/assets/img/favicon.svg} (100%) create mode 100644 res/forgejo/assets/img/logo.svg diff --git a/hosts/ami/forgejo.nix b/hosts/ami/forgejo.nix index b474ad8..2fad10d 100644 --- a/hosts/ami/forgejo.nix +++ b/hosts/ami/forgejo.nix @@ -78,16 +78,17 @@ in { forceSSL = true; locations = { - "/" = { + "@forgejo" = { proxyPass = "http://localhost:${toString port}"; }; - "= /assets/img/logo.svg" = { - alias = ../../res/kitchen_logo.svg; + "/" = { + tryFiles = "$uri @forgejo"; }; - "= /assets/img/favicon.svg" = { - alias = ../../res/kitchen_logo.svg; + "/assets/" = { + root = ../../res/forgejo; + tryFiles = ''$uri @forgejo''; }; }; }; diff --git a/res/kitchen_logo.svg b/res/forgejo/assets/img/favicon.svg similarity index 100% rename from res/kitchen_logo.svg rename to res/forgejo/assets/img/favicon.svg diff --git a/res/forgejo/assets/img/logo.svg b/res/forgejo/assets/img/logo.svg new file mode 100644 index 0000000..2b8d8dd --- /dev/null +++ b/res/forgejo/assets/img/logo.svg @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + +