hackens-org-configurations/machines/hackens-org/static-sites.nix

29 lines
469 B
Nix
Raw Normal View History

2023-12-04 17:42:06 +01:00
{ pkgs, lib, ... }:
let
sites = [
"/2048"
"/prez"
"/known"
"/pub"
];
in
{
services.nginx.enable = true;
services.nginx.virtualHosts = {
2023-12-20 19:53:09 +01:00
"hackens.org" = {
2023-12-04 17:42:06 +01:00
forceSSL = true;
enableACME = true;
locations = lib.genAttrs sites (name: {
root = "/var/www";
2023-12-20 19:53:09 +01:00
extraConfig = ''
autoindex on;
charset utf-8;
'';
2023-12-04 17:42:06 +01:00
});
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}