diff options
Diffstat (limited to 'users/wpcarro/website/default.nix')
-rw-r--r-- | users/wpcarro/website/default.nix | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/users/wpcarro/website/default.nix b/users/wpcarro/website/default.nix index 9480c38e9fe2..60d8dc19e768 100644 --- a/users/wpcarro/website/default.nix +++ b/users/wpcarro/website/default.nix @@ -1,13 +1,27 @@ { pkgs, depot, ... }: -pkgs.stdenv.mkDerivation { - name = "wpcarro.dev"; - src = builtins.path { path = ./.; name = "website"; }; - installPhase = '' - mkdir -p $out - cp $src/index.html $out - - mkdir -p $out/habits - cp -r ${depot.users.wpcarro.website.habit-screens} $out/habits/index.html - ''; +rec { + inherit (depot.users) wpcarro; + + header = "${./fragments/header.html}"; + footer = "${./fragments/footer.html}"; + addendum = "${./fragments/addendum.html}"; + + root = pkgs.stdenv.mkDerivation { + name = "wpcarro.dev"; + src = builtins.path { path = ./.; name = "website"; }; + installPhase = '' + mkdir -p $out + + cat ${header} \ + ${./fragments/homepage.html} \ + ${footer} \ + ${addendum} > $out/index.html + + mkdir -p $out/habits + cp -r ${wpcarro.website.habit-screens} $out/habits/index.html + + cp -r ${wpcarro.website.blog.root} $out/blog + ''; + }; } |