nix/modules/services/nginx/default.nix

40 lines
1,019 B
Nix
Raw Normal View History

2024-11-08 18:23:40 +01:00
{domain, ...}: {
2024-11-03 12:33:02 +01:00
services.nginx = {
2024-11-04 13:00:43 +01:00
virtualHosts."xn--xck.xyz" = {
forceSSL = true;
enableACME = true;
2024-11-08 18:23:40 +01:00
root = "/var/www/${domain}";
2024-11-04 13:00:43 +01:00
};
2024-11-08 18:23:40 +01:00
virtualHosts."${domain}" = {
2024-11-04 13:00:43 +01:00
forceSSL = true;
enableACME = true;
2024-11-08 18:23:40 +01:00
root = "/var/www/www.${domain}";
2024-11-04 13:00:43 +01:00
};
2024-11-08 18:23:40 +01:00
virtualHosts."www.${domain}" = {
2024-11-03 12:33:02 +01:00
forceSSL = true;
enableACME = true;
2024-11-08 18:23:40 +01:00
root = "/var/www/${domain}";
2024-11-03 12:33:02 +01:00
};
2024-11-08 18:23:40 +01:00
virtualHosts."4get.${domain}" = {
2024-11-06 17:01:38 +01:00
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:8080";
};
2024-11-08 18:23:40 +01:00
virtualHosts."pin.${domain}" = {
2024-11-06 17:53:05 +01:00
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:6060";
};
2024-11-08 18:23:40 +01:00
virtualHosts."trans.${domain}" = {
2024-11-06 17:53:05 +01:00
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:5000";
};
2024-11-08 18:23:40 +01:00
virtualHosts."wallpapers.${domain}" = {
2024-11-06 19:04:28 +01:00
forceSSL = true;
enableACME = true;
2024-11-08 19:23:25 +01:00
root = "/var/www/wallpapers.${domain}";
2024-11-06 19:04:28 +01:00
};
2024-11-03 12:33:02 +01:00
};
}