2023-06-24 15:59:31 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
|
|
|
pages = pkgs.fetchFromGitea {
|
|
|
|
domain = "git.fainsin.bzh";
|
|
|
|
owner = "Laurent";
|
|
|
|
repo = "personal-website";
|
|
|
|
rev = "pages";
|
|
|
|
sha256 = "sha256-ahx9YSKyImQDu7k6/hbgYQdAnw5yInXQ/n14CLWTVkc=";
|
|
|
|
};
|
|
|
|
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;
|
|
|
|
locations."/".return = ''301 "$scheme://fainsin.bzh" '';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|