helm/test-nginx.nix
Anish Lakhwara e3e7c1d99c bowl
2021-01-29 00:13:47 +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 ];
}