{ pkgs, lib, ... }: let bbeu = pkgs.stdenv.mkDerivation { name = "benjaminbaedorf.eu"; src = pkgs.fetchgit { url = "https://git.pub.solar/b12f/benjaminbaedorf.eu.git"; rev = "618c7f643f63752340a96a8caca40dac43e545da"; hash = "sha256-u8dCKHitZgJJpDOlD5vzAxIVET6/1rKy3T9EoodMIGU="; 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"; }; }; }; }