about summary refs log blame commit diff
path: root/users/wpcarro/website/default.nix
blob: b20de562ab6fd7ebd4452ec5549a721d9dae8098 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
                     
 

                              

                                





                                            
 

                                                
 

                                                                     
 


                                                                 
 
           
                                           
     
 
{ pkgs, depot, ... }:

let
  inherit (builtins) readFile;
  inherit (depot.users) wpcarro;

  render = contentHtml: pkgs.substituteAll {
    inherit contentHtml;
    src = ./fragments/template.html;
  };
in {
  inherit render;

  root = pkgs.runCommandNoCC "wpcarro.dev" {} ''
    mkdir -p $out

    # /
    cp ${render (readFile ./fragments/homepage.html)} $out/index.html

    # /habits
    mkdir -p $out/habits
    cp -r ${wpcarro.website.habit-screens} $out/habits/index.html

    # /blog
    cp -r ${wpcarro.website.blog} $out/blog
  '';
}