2021-09-22 10:16:11 +02:00
|
|
|
{
|
2021-11-27 22:48:34 +01:00
|
|
|
imports = [ ../../../common/services/nginx.nix ];
|
|
|
|
services.nginx.virtualHosts = {
|
|
|
|
"graven.dev" = {
|
2022-04-12 17:36:08 +02:00
|
|
|
enableACME = true;
|
2021-11-27 22:48:34 +01:00
|
|
|
forceSSL = true;
|
|
|
|
locations."/".root = "/var/www/graven.dev/public";
|
2023-10-16 07:56:23 +02:00
|
|
|
locations."~ ^/(client|_matrix/client/unstable/org.matrix.msc3575/sync)" = {
|
|
|
|
proxyPass = "http://127.0.0.1:8009";
|
|
|
|
priority = 900;
|
|
|
|
};
|
|
|
|
locations."~ ^(\\/_matrix|\\/_synapse\\/client)" = {
|
|
|
|
proxyPass = "http://127.0.0.1:8008";
|
|
|
|
priority = 1000;
|
|
|
|
};
|
2021-11-27 22:48:34 +01:00
|
|
|
locations."/.well-known/matrix/" = {
|
|
|
|
root = "/var/www/matrix/public";
|
|
|
|
extraConfig = ''
|
|
|
|
default_type application/json;
|
|
|
|
add_header Access-Control-Allow-Origin "*";
|
|
|
|
add_header Strict-Transport-Security $hsts_header;
|
|
|
|
add_header Referrer-Policy "same-origin";
|
|
|
|
add_header X-Content-Type-Options "nosniff";
|
|
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
"rss.graven.dev" = {
|
2022-04-12 17:36:08 +02:00
|
|
|
enableACME = true;
|
2021-11-27 22:48:34 +01:00
|
|
|
forceSSL = true;
|
|
|
|
};
|
|
|
|
"git.graven.dev" = {
|
2022-04-12 17:36:08 +02:00
|
|
|
enableACME = true;
|
2021-11-27 22:48:34 +01:00
|
|
|
forceSSL = true;
|
2023-12-13 20:27:13 +01:00
|
|
|
locations."/".proxyPass = "http://unix:/run/forgejo/forgejo.sock:";
|
2021-11-27 22:48:34 +01:00
|
|
|
};
|
|
|
|
"vault.graven.dev" = {
|
|
|
|
forceSSL = true;
|
2022-04-12 17:36:08 +02:00
|
|
|
enableACME = true;
|
2021-11-27 22:48:34 +01:00
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:8812";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
locations."/notifications/hub" = {
|
|
|
|
proxyPass = "http://localhost:3012";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
locations."/notifications/hub/negotiate" = {
|
|
|
|
proxyPass = "http://localhost:8812";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
"openpgpkey.graven.dev" = {
|
|
|
|
forceSSL = true;
|
2022-04-12 17:36:08 +02:00
|
|
|
enableACME = true;
|
2021-11-27 22:48:34 +01:00
|
|
|
locations."/" = {
|
2021-12-09 16:19:45 +01:00
|
|
|
root = "/var/www/openpgpkey";
|
2021-11-27 22:48:34 +01:00
|
|
|
extraConfig = ''
|
|
|
|
default_type "application/octet-stream";
|
|
|
|
add_header Access-Control-Allow-Origin "*";
|
|
|
|
add_header Strict-Transport-Security $hsts_header;
|
|
|
|
add_header Referrer-Policy "same-origin";
|
|
|
|
add_header X-Frame-Options "DENY";
|
|
|
|
add_header X-Content-Type-Options "nosniff";
|
|
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
"openpgpkey.graven.se" = {
|
|
|
|
forceSSL = true;
|
2022-04-12 17:36:08 +02:00
|
|
|
enableACME = true;
|
2021-11-27 22:48:34 +01:00
|
|
|
locations."/" = {
|
2021-12-09 16:19:45 +01:00
|
|
|
root = "/var/www/openpgpkey";
|
2021-11-27 22:48:34 +01:00
|
|
|
extraConfig = ''
|
|
|
|
default_type "application/octet-stream";
|
|
|
|
add_header Access-Control-Allow-Origin "*";
|
|
|
|
add_header Strict-Transport-Security $hsts_header;
|
|
|
|
add_header Referrer-Policy "same-origin";
|
|
|
|
add_header X-Frame-Options "DENY";
|
|
|
|
add_header X-Content-Type-Options "nosniff";
|
|
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2021-12-10 08:33:12 +01:00
|
|
|
"tor.graven.dev" = {
|
|
|
|
forceSSL = true;
|
2022-04-12 17:36:08 +02:00
|
|
|
enableACME = true;
|
2021-12-10 08:33:12 +01:00
|
|
|
locations."/" = {
|
|
|
|
root = "/var/www/tor";
|
|
|
|
extraConfig = ''
|
|
|
|
add_header Access-Control-Allow-Origin "*";
|
|
|
|
add_header Strict-Transport-Security $hsts_header;
|
|
|
|
add_header Referrer-Policy "same-origin";
|
|
|
|
add_header X-Frame-Options "DENY";
|
|
|
|
add_header X-Content-Type-Options "nosniff";
|
|
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2021-11-27 22:48:34 +01:00
|
|
|
"mta-sts.graven.dev" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = "/var/www/mta-sts/public";
|
|
|
|
};
|
|
|
|
"mta-sts.graven.se" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = "/var/www/mta-sts/public";
|
|
|
|
};
|
|
|
|
"mta-sts.nao.sh" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = "/var/www/mta-sts/public";
|
|
|
|
};
|
|
|
|
"mta-sts.amandag.net" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = "/var/www/mta-sts/public";
|
|
|
|
};
|
|
|
|
"mta-sts.queersin.space" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = "/var/www/mta-sts/public";
|
|
|
|
};
|
|
|
|
"mta-sts.anarkafem.dev" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
root = "/var/www/mta-sts/public";
|
|
|
|
};
|
|
|
|
};
|
2021-09-22 10:16:11 +02:00
|
|
|
}
|