{ self, ... }: { perSystem = { ... }: { websites.${self.domain} = { config, lib, ... }: let inherit (lib) mkOption types; replacements = { "@title@" = config.title; "@stylesheet@" = ''''; "@head@" = '' ''; }; replace = file: with lib; replaceStrings (attrNames replacements) (attrValues replacements) file; in { files = with lib; listToAttrs ( map (path: rec { name = baseNameOf path; value = with builtins; toFile "index.html" (replace (readFile path)); }) [ ./html/index.html ./html/vergangene-termine.html ./html/impressum.html ./html/datenschutz.html ] ); }; }; }