diff options
| author | seth <[email protected]> | 2024-05-24 23:17:20 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-05-24 21:36:05 -0600 |
| commit | f031c6e452ad883424d65227a558bc4155f6039e (patch) | |
| tree | 1538c9446497c2c29e3264a5d7699514a5757c63 /lib/nginx.nix | |
| parent | f4bf843db8765fda3a4629d9846c2edc458712eb (diff) | |
document lib
Diffstat (limited to 'lib/nginx.nix')
| -rw-r--r-- | lib/nginx.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/nginx.nix b/lib/nginx.nix index bcf3332..0564dba 100644 --- a/lib/nginx.nix +++ b/lib/nginx.nix @@ -1,4 +1,7 @@ lib: { + # string -> int -> { } + # create an nginx virtualHost submodule proxying local port + # `port` to `endpoint` mkProxy = endpoint: port: { "${endpoint}" = { proxyPass = "http://localhost:${toString port}"; @@ -6,6 +9,9 @@ lib: { }; }; + # string -> { } -> { } + # transform the names of an attribute set of nginx virtualHosts + # into a full subdomain toVHosts = domain: lib.mapAttrs' ( name: lib.nameValuePair "${name}.${domain}" |
