(hydrogen/nginx) fetch personnal website from gitea pages branch

This commit is contained in:
Laureηt 2023-06-24 17:59:31 +02:00
parent 3faf0db807
commit e74505a986
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI

View file

@ -1,21 +1,28 @@
{ ... }: { { pkgs, ... }:
let
pages = pkgs.fetchFromGitea {
domain = "git.fainsin.bzh";
owner = "Laurent";
repo = "personal-website";
rev = "pages";
sha256 = "sha256-ahx9YSKyImQDu7k6/hbgYQdAnw5yInXQ/n14CLWTVkc=";
};
in {
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"laurent.fainsin.bzh" = {
enableACME = true;
forceSSL = true;
root = "${pages}";
};
"fainsin.bzh" = { "fainsin.bzh" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/".return = locations."/".return =
''301 "$scheme://laurent.fainsin.bzh$request_uri"''; ''301 "$scheme://laurent.fainsin.bzh$request_uri"'';
}; };
"laurent.fainsin.bzh" = {
enableACME = true;
forceSSL = true;
root = "/srv/www/";
};
default = { default = {
default = true; default = true;
locations."/".return = ''301 "$scheme://fainsin.bzh" ''; locations."/".return = ''301 "$scheme://fainsin.bzh" '';
}; };
}; };
} }