diff --git a/default.nix b/default.nix index 2715090..eaa1fb8 100644 --- a/default.nix +++ b/default.nix @@ -7,16 +7,26 @@ ]; website = { - url = "https://localhost/"; + url = "https://webzine.snowflake.ovh/"; style = builtins.readFile ./style.html; + header = '' +
+

❄️NixOS Webzine

+ +
+ ''; }; in pkgs.stdenv.mkDerivation rec { name = "nixos-webzine"; + src = ./static; + builder = pkgs.writeShellScript "builder.sh" ( '' - ${pkgs.busybox}/bin/mkdir -p $out + ${pkgs.busybox}/bin/mkdir -p $out/static + ${pkgs.busybox}/bin/cp ${index_generator}/* $out/ + ${pkgs.busybox}/bin/cp -fr $src/* $out/static/ '' + ( pkgs.lib.concatStringsSep "\n" @@ -30,7 +40,7 @@ in pages_generator = (builtins.map (element: let issue = import element; in - pkgs.writeTextDir "${issue.number}.html" '' + pkgs.writeTextDir "issue-${issue.number}.html" '' @@ -50,13 +60,15 @@ in ${website.style} + ${website.header}
- - ${ + + + ${ if (builtins.length issue.news) != 0 then ''
- +

News