41 lines
745 B
Nix
41 lines
745 B
Nix
|
{ pkgs, ... }:
|
||
|
|
||
|
{
|
||
|
services.nginx.virtualHosts."sbruder.xyz" = {
|
||
|
forceSSL = true;
|
||
|
enableACME = true;
|
||
|
|
||
|
root = pkgs.stdenvNoCC.mkDerivation {
|
||
|
name = "sbruder.xyz";
|
||
|
|
||
|
src = ./.;
|
||
|
|
||
|
nativeBuildInputs = with pkgs; [ pandoc ];
|
||
|
|
||
|
buildPhase = ''
|
||
|
runHook preBuild
|
||
|
|
||
|
pandoc \
|
||
|
-s \
|
||
|
--metadata-file metadata.yaml \
|
||
|
-f commonmark_x \
|
||
|
-t html5 \
|
||
|
-o index.html \
|
||
|
index.md
|
||
|
|
||
|
runHook postBuild
|
||
|
'';
|
||
|
|
||
|
installPhase = ''
|
||
|
runHook preInstall
|
||
|
install -D index.html $out/index.html
|
||
|
runHook postInstall
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
locations = {
|
||
|
"/imprint/".alias = "${pkgs.sbruder.imprint}/";
|
||
|
};
|
||
|
};
|
||
|
}
|