From 0efd609dd832b11c4e4e20c008edc1cc52dbfbd9 Mon Sep 17 00:00:00 2001 From: Valentin Date: Tue, 16 Dec 2025 23:21:41 +0100 Subject: Dateiliste verallgemeinert --- www/index.nix | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'www/index.nix') 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@" = ''''; @@ -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 ); }; }; -- cgit v1.2.3