2021-12-14 04:51:48 +01:00
|
|
|
{ pkgs, depot, ... }:
|
2020-03-20 01:22:13 +01:00
|
|
|
|
2021-12-28 01:06:08 +01:00
|
|
|
let
|
|
|
|
inherit (builtins) readFile;
|
2021-12-27 16:52:53 +01:00
|
|
|
inherit (depot.users) wpcarro;
|
|
|
|
|
2021-12-28 01:06:08 +01:00
|
|
|
render = contentHtml: pkgs.substituteAll {
|
|
|
|
inherit contentHtml;
|
|
|
|
src = ./fragments/template.html;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
inherit render;
|
2021-12-27 16:52:53 +01:00
|
|
|
|
2021-12-28 01:06:08 +01:00
|
|
|
root = pkgs.runCommandNoCC "wpcarro.dev" {} ''
|
|
|
|
mkdir -p $out
|
2021-12-27 16:52:53 +01:00
|
|
|
|
2021-12-28 01:06:08 +01:00
|
|
|
# /
|
|
|
|
cp ${render (readFile ./fragments/homepage.html)} $out/index.html
|
2021-12-27 16:52:53 +01:00
|
|
|
|
2021-12-28 01:06:08 +01:00
|
|
|
# /habits
|
|
|
|
mkdir -p $out/habits
|
|
|
|
cp -r ${wpcarro.website.habit-screens} $out/habits/index.html
|
2021-12-27 16:52:53 +01:00
|
|
|
|
2021-12-28 01:06:08 +01:00
|
|
|
# /blog
|
|
|
|
cp -r ${wpcarro.website.blog.root} $out/blog
|
|
|
|
'';
|
2020-03-20 01:22:13 +01:00
|
|
|
}
|