31 lines
477 B
Nix
31 lines
477 B
Nix
{ pkgs, lib, ... }:
|
|
let
|
|
sites = [
|
|
"/2048"
|
|
"/prez"
|
|
"/known"
|
|
"/pub"
|
|
];
|
|
in
|
|
{
|
|
|
|
services.nginx.enable = true;
|
|
services.nginx.virtualHosts = {
|
|
"hackens.org" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations = lib.genAttrs sites (name: {
|
|
root = "/var/www";
|
|
extraConfig = ''
|
|
autoindex on;
|
|
charset utf-8;
|
|
'';
|
|
});
|
|
};
|
|
|
|
};
|
|
networking.firewall.allowedTCPPorts = [
|
|
80
|
|
443
|
|
];
|
|
}
|