{ self, ... }: { perSystem = { ... }: { websites.${self.domain} = { lib, ... }: let inherit (lib) mkOption types; in { files = let root = ./html; files = lib.fileset.toList root; redirects = with lib; mapAttrsToList (name: value: { name = head value.locations; inherit value; }) { kindertag = { path = ./html/Kalender/Kindertag-in-der-Mehrwertkultur.html; locations = [ "Kalender/Kindertag-in-der-Mehrwertkultur.html" "Kalender/Kindertag in der Mehrwertkultur.html" ]; }; kinder-banner = { path = ./html/Kalender/Kindertag-in-der-Mehrwertkultur_html_7312c2696b940296.png; locations = [ "Kalender/Kindertag-in-der-Mehrwertkultur_html_7312c2696b940296.png" "Kalender/Kindertag in der Mehrwertkultur_html_7312c2696b940296.png" ]; }; contraZt-logo = { path = ./html/Kalender/Kindertag-in-der-Mehrwertkultur_html_290e08fdf9314385.jpg; locations = [ "Kalender/Kindertag-in-der-Mehrwertkultur_html_290e08fdf9314385.jpg" "Kalender/Kindertag in der Mehrwertkultur_html_290e08fdf9314385.jpg" ]; }; }; in lib.listToAttrs ( redirects ++ map (file: { name = lib.path.removePrefix root file; value = file; }) files ); }; }; }