{ self, ... }: { perSystem = { ... }: { websites.${self.domain} = { lib, ... }: let inherit (lib) mkOption types; in { options = { # Erweiterung zwecks ad-hoc templating events = mkOption { type = with types; attrsOf ( submodule ( { name, ... }: { options.name = mkOption { type = str; readOnly = true; default = name; }; options.__toString = mkOption { type = functionTo str; readOnly = true; default = self: ''
${self.title}
${self.address.name}
${with lib; concatStringsSep ", " (splitString "\n" (trim self.address.text))}
${ if !isNull self.summary then ''
${self.summary} ${self.description}
'' else if !isNull self.description then '' ${self.description} '' else "" } ${lib.optionalString (!isNull self.aside) ''''} ${ with lib; optionalString (self.data != [ ]) ''
${concatMapStringsSep "\n" (entry: ''
${entry.name}
${entry.value}
'') self.data}
'' } ${ with lib; let print-host = host: ''${host.name}''; in if self.hosts == [ ] then "" else if length self.hosts == 1 then ''

Veranstalter: ${print-host (head self.hosts)}

'' else ''

Veranstalter:

'' } ${ with lib; let print-link = link: ''${link.text}''; in if self.links == [ ] then "" else if length self.links == 1 then ''

Weitere Informationen: ${print-link (head self.links)}

'' else ''

Weitere Informationen:

'' }
''; }; } ) ); }; }; }; }; }