{ pkgs, lib, ... }: let bbeu = pkgs.stdenv.mkDerivation { name = "benjaminbaedorf.eu"; src = pkgs.fetchgit { url = "https://git.pub.solar/b12f/benjaminbaedorf.eu.git"; rev = "a6cc1d054fef083698331ad4cef6cc6e57ed218c"; hash = "sha256-uW6TwmXu0Tpapz+sewfCPYkDJcwTpMYPXLUGcd//UH0="; sparseCheckout = [ "fonts" "cows.jpg" "fonts.css" "index.html" "public-pgp-benjamin-baedorf.asc" ]; }; installPhase = '' mkdir -p $out cp -r * $out/ ''; }; in { security.acme.certs = { "benjaminbaedorf.eu" = {}; "b12f.io" = {}; }; services.nginx.virtualHosts = { "benjaminbaedorf.eu" = { forceSSL = true; useACMEHost = "benjaminbaedorf.eu"; locations."/".return = "302 https://b12f.io$request_uri"; }; "b12f.io" = { forceSSL = true; useACMEHost = "b12f.io"; locations."/" = { root = bbeu; index = "index.html"; tryFiles = "$uri $uri/ =404"; }; }; }; }