helm/reference/test-nginx.nix
2021-01-09 20:04:32 +10:00

25 lines
465 B
Nix

{ pkgs, config, lib, ... }:
let
vhost = "192.168.1.6:1232";
in
{
services.nginx.virtualHosts."${vhost}" = {
forceSSL = false;
enableACME = false;
root = "/var/lib/test";
listen = [ { addr = "192.168.1.6"; port = 1232; } ];
extraConfig = ''
index index.html;
'';
locations."/" = {
extraConfig = ''
try_files $uri $uri/ index.html;
'';
};
};
networking.firewall.allowedTCPPorts = [ 1232 ];
}