Simon Bruder
4880116919
I don’t want to do this, but I might have to. Hetzner’s ToS are very vague in what content they don’t allow, so I think I might have to comply with the Russian censorship authority.
52 lines
942 B
Nix
52 lines
942 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./blocks.nix
|
|
];
|
|
|
|
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}/";
|
|
"/transparency/" = {
|
|
alias = "${./transparency}/";
|
|
extraConfig = ''
|
|
autoindex on;
|
|
charset utf-8;
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|