2023-11-12 20:45:02 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
bbeu = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "benjaminbaedorf.eu";
|
2023-11-12 23:19:53 +00:00
|
|
|
src = pkgs.fetchgit {
|
2023-11-12 20:45:02 +00:00
|
|
|
url = "https://git.pub.solar/b12f/benjaminbaedorf.eu.git";
|
2023-11-18 20:44:39 +00:00
|
|
|
rev = "618c7f643f63752340a96a8caca40dac43e545da";
|
|
|
|
hash = "sha256-u8dCKHitZgJJpDOlD5vzAxIVET6/1rKy3T9EoodMIGU=";
|
2023-11-12 20:45:02 +00:00
|
|
|
sparseCheckout = [
|
|
|
|
"fonts"
|
|
|
|
"cows.jpg"
|
|
|
|
"fonts.css"
|
|
|
|
"index.html"
|
|
|
|
"public-pgp-benjamin-baedorf.asc"
|
|
|
|
];
|
|
|
|
};
|
2023-11-12 23:19:53 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r * $out/
|
|
|
|
'';
|
2023-11-12 20:45:02 +00:00
|
|
|
};
|
|
|
|
in {
|
2023-11-14 17:44:46 +00:00
|
|
|
security.acme.certs = {
|
|
|
|
"benjaminbaedorf.eu" = {};
|
|
|
|
"b12f.io" = {};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts = {
|
2023-11-12 20:45:02 +00:00
|
|
|
"benjaminbaedorf.eu" = {
|
2023-11-14 17:44:46 +00:00
|
|
|
forceSSL = true;
|
|
|
|
useACMEHost = "benjaminbaedorf.eu";
|
|
|
|
locations."/".return = "302 https://b12f.io$request_uri";
|
2023-11-12 20:45:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
"b12f.io" = {
|
2023-11-14 17:44:46 +00:00
|
|
|
forceSSL = true;
|
|
|
|
useACMEHost = "b12f.io";
|
2023-11-12 20:45:02 +00:00
|
|
|
|
2023-11-14 17:44:46 +00:00
|
|
|
locations."/" = {
|
|
|
|
root = bbeu;
|
|
|
|
index = "index.html";
|
|
|
|
tryFiles = "$uri $uri/ =404";
|
|
|
|
};
|
2023-11-12 20:45:02 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|