forked from UniverseBow/wa2k.com-Website
add nix compatible build environment
This commit is contained in:
parent
6e74e3bb32
commit
7640fd995a
7 changed files with 219 additions and 0 deletions
25
nixos/default.nix
Normal file
25
nixos/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue