haccfiles/websites/mumble.infra4future.de/default.nix
stuebinm 12e4cba3e6 websites: better watch scripts
nix run .#\"<domain>\" will now actually listen for changes in the
source repository, and not first copy the entire thing into the nix
store.
2024-01-12 00:41:15 +01:00

19 lines
477 B
Nix

{ jekyll, stdenvNoCC, writeScriptBin }:
stdenvNoCC.mkDerivation rec {
name = "mumble.infra4future.de-static";
src = ./.;
phases = [ "buildPhase" ];
buildPhase = ''
cd $src
${jekyll}/bin/jekyll build -d $out --disable-disk-cache
'';
watch = writeScriptBin "watch" ''
cd $(git rev-parse --show-toplevel)/websites/mumble.infra4future.de
rm -rf /tmp/hacc-website
${jekyll}/bin/jekyll serve --disable-disk-cache -d /tmp/hacc-website "$@"
'';
}