diff options
Diffstat (limited to 'www/index.nix')
| -rw-r--r-- | www/index.nix | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/www/index.nix b/www/index.nix index 607a005..b1b74dd 100644 --- a/www/index.nix +++ b/www/index.nix @@ -7,6 +7,10 @@ { config, lib, ... }: let inherit (lib) mkOption types; + root = ./html; + files = + with lib.fileset; + toList (difference (fileFilter (file: file.hasExt "html") root) ./html/Kalender); replacements = { "@title@" = config.title; "@stylesheet@" = ''<link rel="stylesheet" type="text/css" href="style.css">''; @@ -23,20 +27,14 @@ replace = file: with lib; replaceStrings (attrNames replacements) (attrValues replacements) file; in { + title = "Stadtteilbeirat Heimfeld"; 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 - ] + map (path: { + name = lib.path.removePrefix root path; + value = with builtins; toFile (baseNameOf path) (replace (readFile path)); + }) files ); }; }; |
