helm/reference/test-nginx.nix

25 lines
465 B
Nix
Raw Permalink Normal View History

{ 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 ];
}