alias also without trailing slash
Some checks failed
Test Nix flake / Test nix flake (push) Has been cancelled

This commit is contained in:
XenGi 2026-10-14 11:45:52 +02:00
commit f4bbbf7a64
Signed by: xengi
SSH key fingerprint: SHA256:jxWM2RTHvxxcncXycwwWkP7HCWb4VREN05UGJTbIPZg

View file

@ -2,6 +2,12 @@
let let
# TODO: mkVHost # TODO: mkVHost
aliasDir = url: path: {
"${url}" = {
return = "301 ${url}/";
};
"${url}/".alias = "${path}/";
};
in in
{ {
imports = [ imports = [
@ -42,14 +48,6 @@ in
index = "index.html"; index = "index.html";
tryFiles = "$uri $uri/ $uri.html =404"; tryFiles = "$uri $uri/ $uri.html =404";
}; };
"/twentyyears/".alias = "/srv/http/twentyyears/";
"/thirtytwoyears/".alias = "/srv/http/thirtytwoyears/";
"/kik/".alias = "/srv/http/kik/";
# RFC8805
"/noc/".alias = "/srv/http/noc/";
"/static/".alias = "/srv/http/static/";
# RFC8805 new location
"/.well-known/loc/".alias = "/srv/http/noc/";
"= /.well-known/security.txt" = { "= /.well-known/security.txt" = {
alias = "/srv/http/security.txt"; alias = "/srv/http/security.txt";
extraConfig = '' extraConfig = ''
@ -91,7 +89,15 @@ in
default_type text/calendar; default_type text/calendar;
''; '';
}; };
}; }
// aliasDir "/twentyyears" "/srv/http/twentyyears"
// aliasDir "/thirtytwoyears" "/srv/http/thirtytwoyears"
// aliasDir "/kik" "/srv/http/kik"
# RFC8805
// aliasDir "/noc" "/srv/http/noc"
// aliasDir "/static" "/srv/http/static"
# RFC8805 new location
// aliasDir "/.well-known/loc" "/srv/http/noc";
}; };
"staging.${config.networking.domain}" = { "staging.${config.networking.domain}" = {
quic = true; quic = true;