2023-06-24 15:59:31 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
2023-06-25 11:50:33 +00:00
|
|
|
pages = pkgs.fetchgit {
|
|
|
|
url = "https://git.fainsin.bzh/Laurent/personal-website";
|
|
|
|
branchName = "pages";
|
|
|
|
fetchLFS = true; # https://github.com/go-gitea/gitea/issues/4773
|
2023-10-03 11:57:53 +00:00
|
|
|
rev = "0c6fd235e496ead9b7ba3e4e918ec4b35dd1b56b"; # pages
|
|
|
|
sha256 = "sha256-XzI6x6ms5nmnSuS9oR+xU+dLRa2ttfOHrkGxIl7M/oc=";
|
2023-06-24 15:59:31 +00:00
|
|
|
};
|
|
|
|
in {
|
2023-06-19 19:08:25 +00:00
|
|
|
services.nginx.virtualHosts = {
|
2023-06-24 15:59:31 +00:00
|
|
|
"laurent.fainsin.bzh" = {
|
2023-06-19 19:08:25 +00:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2023-06-24 15:59:31 +00:00
|
|
|
root = "${pages}";
|
2023-06-19 19:08:25 +00:00
|
|
|
};
|
2023-06-24 15:59:31 +00:00
|
|
|
"fainsin.bzh" = {
|
2023-06-19 19:08:25 +00:00
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
2023-06-24 15:59:31 +00:00
|
|
|
locations."/".return =
|
|
|
|
''301 "$scheme://laurent.fainsin.bzh$request_uri"'';
|
2023-06-19 19:08:25 +00:00
|
|
|
};
|
|
|
|
default = {
|
|
|
|
default = true;
|
2023-10-19 19:01:59 +00:00
|
|
|
locations."/".return = ''301 "$scheme://laurent.fainsin.bzh" '';
|
2023-06-19 19:08:25 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|