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

24 lines
407 B
Nix
Raw Normal View History

2023-07-25 18:59:13 +02:00
{ pkgs, lib, ... }:
let
sites = [
"/NdS"
"/2048"
"/prez"
"/known"
"/pub"
];
in
{
services.nginx.enable = true;
services.nginx.virtualHosts."new.hackens.org" = {
forceSSL = true;
enableACME = true;
locations = lib.genAttrs sites (name: {
root = "/var/www";
extraConfig = "autoindex on;";
});
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}