25 lines
455 B
Nix
25 lines
455 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
cfg = config.services.wa2k;
|
|
in {
|
|
imports = [./wa2k];
|
|
|
|
networking.firewall.allowedTCPPorts = lib.optional cfg.openFirewall [cfg.port];
|
|
|
|
# REF: https://nixos.wiki/wiki/Static_Web_Server
|
|
services.static-web-server = {
|
|
enable = true;
|
|
listen = "[::]:${cfg.port}";
|
|
root = "${pkgs.wa2k-website}/www";
|
|
|
|
configuration = {
|
|
general = {
|
|
directory-listing = false;
|
|
};
|
|
};
|
|
};
|
|
}
|