Simon Bruder
02e74f1915
Its service is no longer public and therefore no longer applying the blocks.
47 lines
923 B
Nix
47 lines
923 B
Nix
# SPDX-FileCopyrightText: 2021-2024 Simon Bruder <simon@sbruder.de>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
services.nginx.virtualHosts."sbruder.xyz" = {
|
|
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
|
|
'';
|
|
};
|
|
|
|
extraConfig = ''
|
|
allow ${config.sbruder.wireguard.home.subnet};
|
|
deny all;
|
|
'';
|
|
|
|
locations = {
|
|
"/imprint/".alias = "${pkgs.sbruder.imprint}/";
|
|
};
|
|
};
|
|
}
|