aboutsummaryrefslogtreecommitdiff
path: root/www/html.nix
diff options
context:
space:
mode:
authorValentin <valentin@fricklerhandwerk.de>2025-12-20 18:22:27 +0100
committerValentin <valentin@fricklerhandwerk.de>2025-12-20 18:22:27 +0100
commit8b0a011c7c37d882a2e12ea8de38acaa9e782d38 (patch)
tree2daea25b800a0733baa6f45fd71afcadf02a9ffc /www/html.nix
parent9a5020deaed97df8ab1307068f34a382b2e24b31 (diff)
parent0efd609dd832b11c4e4e20c008edc1cc52dbfbd9 (diff)
Merge branch 'nix-html'
HTML werden ab jetzt aus Nix-modulen generiert.
Diffstat (limited to 'www/html.nix')
-rw-r--r--www/html.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/www/html.nix b/www/html.nix
new file mode 100644
index 0000000..97cf089
--- /dev/null
+++ b/www/html.nix
@@ -0,0 +1,57 @@
+{ self, ... }:
+{
+ perSystem =
+ { ... }:
+ {
+ websites.${self.domain} =
+ { lib, ... }:
+ let
+ inherit (lib) mkOption types;
+ in
+ {
+ files =
+ let
+ root = ./html;
+ files = with 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 = lib.mkDefault file;
+ }) files
+ );
+ };
+
+ };
+}