nixos/hosts/stella-web.nix
2024-11-12 18:05:52 -05:00

53 lines
1.5 KiB
Nix

{
services.nginx.enable = true;
systemd.services.nginx.serviceConfig.ProtectHome = false;
services.nginx.virtualHosts."stella.wolfgirl.systems" = {
forceSSL = true;
enableACME = true;
extraConfig = ''
charset utf-8;
'';
locations."~ \"^/~(.+?)(/.*)?$\"" = {
alias = "/home/$1/public_html$2";
index = "index.html";
extraConfig = ''
error_page 404 /~$1/404.html;
'';
};
};
services.nginx.virtualHosts."wolfgirl.systems" = {
forceSSL = true;
enableACME = true;
root = "/home/azriel/wolfgirl.systems/book";
};
services.nginx.virtualHosts."lastfm.aubrey.pet" = {
forceSSL = true;
enableACME = true;
root = "/home/azriel/wolfgirl.systems/book";
locations."/" = {
proxyPass = "http://127.0.0.1:5000";
extraConfig = ''
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
};
};
services.nginx.virtualHosts."bun-e.fyi" = {
forceSSL = true;
enableACME = true;
root = "/home/6a/public_html";
locations."/".index = "e.html";
extraConfig = ''
charset utf-8;
'';
};
security.acme = {
acceptTerms = true;
defaults.email = "me@ezri.pet";
};
}