config-perso/machines/kat-son/doc/webroot.nix

22 lines
532 B
Nix

{
hugo,
hugo-theme-extranix-options-search,
options-files,
settings,
static-data,
lib,
runCommand,
}:
runCommand "nix-doc-webroot" { }
''
mkdir themes
ln -s ${hugo-theme-extranix-options-search} themes/extranix-options-search
cp -rs ${static-data} static
chmod -R u+w static
mkdir static/data
${lib.concatStringsSep "\n" (
lib.mapAttrsToList (name: file: "ln -s ${file} static/data/options-${name}.json") options-files
)}
ln -s ${settings} config.yaml
${lib.getExe hugo} --noBuildLock -d $out
''