haccfiles/websites/infra4future.de/default.nix
stuebinm a6d21f4fd9 make working on websites nicer
(since every time we have to change anything on these I get annoyed at
having to remember how to build these. Now you can just use `nix run`!)
2023-02-24 17:33:48 +01:00

18 lines
403 B
Nix

{ jekyll, stdenvNoCC, writeScriptBin }:
stdenvNoCC.mkDerivation rec {
name = "infra4future.de-static";
src = ./.;
phases = [ "buildPhase" ];
buildPhase = ''
cd $src
${jekyll}/bin/jekyll build -d $out --disable-disk-cache
'';
watch = writeScriptBin "watch" ''
rm -rf /tmp/hacc-website
${jekyll}/bin/jekyll serve -s ${src} --disable-disk-cache -d /tmp/hacc-website
'';
}