2021-09-08 18:23:21 +02:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2023-04-29 09:41:00 +02:00
|
|
|
imports = [
|
|
|
|
./blocks.nix
|
|
|
|
];
|
|
|
|
|
2021-09-08 18:23:21 +02:00
|
|
|
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}/";
|
2023-04-29 09:41:00 +02:00
|
|
|
"/transparency/" = {
|
|
|
|
alias = "${./transparency}/";
|
|
|
|
extraConfig = ''
|
|
|
|
autoindex on;
|
|
|
|
charset utf-8;
|
|
|
|
'';
|
|
|
|
};
|
2021-09-08 18:23:21 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|