import favicons into all **.ily.rs sites

This commit is contained in:
Lewis Wynne 2026-04-29 18:17:56 +01:00
parent 4699453cf6
commit 554a268369
11 changed files with 45 additions and 0 deletions

18
modules/favicons.nix Normal file
View file

@ -0,0 +1,18 @@
{ ... }:
let
faviconRoot = ../assets/favicons;
in
{
services.caddy.extraConfig = ''
(favicons) {
@favicon path /favicon.ico /favicon.svg /favicon.png /apple-touch-icon.png /apple-touch-icon-precomposed.png
handle @favicon {
root * ${faviconRoot}
@needs_png path /favicon.ico /apple-touch-icon.png /apple-touch-icon-precomposed.png
rewrite @needs_png /favicon.png
header Cache-Control "public, max-age=86400"
file_server
}
}
'';
}