no nixondroid + deploy hugo

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-06-17 15:11:27 +02:00
parent 7952492672
commit 30f5ee6a3a
3 changed files with 17 additions and 26 deletions

View File

@@ -9,7 +9,7 @@
acceptTerms = true;
defaults = {
email = "acme@${hyper.domain}";
webroot = "/var/nginx/webroot";
webroot = config.services.nginx.virtualHosts."${hyper.domain}".root;
group = "nginx";
};
certs = {
@@ -77,22 +77,24 @@
};
in {
"${hyper.domain}" = vh // {
root = "/var/nginx/webroot";
# root = "/var/nginx/webroot";
root = "/var/lib/hugo/nx2site/public";
default = true;
listen = dl;
locations = {
"/" = {
extraConfig = ''
index index.html;
if ($request_uri ~ ^/(.*)\.html(\?|$)) {
return 301 /$1;
}
try_files $uri $uri.html $uri/ /404.html =404;
'';
};
"~^(/ba)$" = { return = "301 /BA.pdf"; };
"/.well-known/matrix/client" = { return = "502"; };
"/.well-known/matrix/server" = { return = "502"; };
"/phone" = { return = "301 /en/cards/phone"; };
"/about-me" = { return = "301 /en/slides/about-me"; };
"/about-this-site" = { return = "301 /en/slides/about-this-site"; };
"/gpg" = { return = "301 /en/cards/gpg"; };
"/contact" = { return = "301 /en/cards/contact"; };
};
};
"matrix.${hyper.domain}" = {
@@ -121,7 +123,7 @@
};
"sync.${hyper.domain}" = vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:11434"; }; };
locations = { "/" = { proxyPass = "http://127.0.0.1:8384"; }; };
};
# "git.${hyper.domain}" = vh // {
# listen = dl;
@@ -157,8 +159,9 @@
proxyWebsockets = true;
};
};
"wip.${hyper.domain}" = vh // {
"old.${hyper.domain}" = vh // {
listen = dl;
root = "/var/nginx/webroot";
};
"dev.${hyper.domain}" = vh // {
listen = dl;