add nix compatible build environment

This commit is contained in:
do butterflies cry? 2026-03-14 16:12:39 +10:00
parent 6e74e3bb32
commit 7640fd995a
Signed by: cry
GPG key ID: F68745A836CA0412
7 changed files with 219 additions and 0 deletions

25
nixos/default.nix Normal file
View file

@ -0,0 +1,25 @@
{
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;
};
};
};
}