diff options
| author | Seth Flynn <[email protected]> | 2025-02-08 14:10:33 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-02-08 15:17:18 -0500 |
| commit | 9db83aab18d17eebeea667938ba3a49b2207451e (patch) | |
| tree | 23915b055f5bf3766a7716b5ba219cc85da46ebb /lib/nginx.nix | |
| parent | 0790e72af536821ab862ccef2ae2038dd9cef33a (diff) | |
lib: drop
I don't really need these nginx functions
Diffstat (limited to 'lib/nginx.nix')
| -rw-r--r-- | lib/nginx.nix | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/lib/nginx.nix b/lib/nginx.nix deleted file mode 100644 index 5cf829b..0000000 --- a/lib/nginx.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ lib, ... }: - -{ - /** - Create an NGINX virtualHost submodule proxying a local port - - # Example - - ```nix - mkProxy "/" "3000" - => { - proxyPass = "http://localhost:3000"; - proxyWebsockets = true; - } - ``` - - # Type - - ``` - mkProxy :: String -> Number -> AttrSet - ``` - - # Arguments - - - [endpoint] virtualHost endpoint that `port` will be proxied towards - - [port] Port to be proxied - */ - mkProxy = endpoint: port: { - "${endpoint}" = { - proxyPass = "http://localhost:${toString port}"; - proxyWebsockets = true; - }; - }; - - /** - Transform the names of an attribute set of nginx virtualHosts into a full subdomain - - # Example - - ```nix - toVHosts "example.com" { - subdomain = { }; - } - => { - "subdomain.example.com" = { }; - } - ``` - - # Type - - ``` - toVHosts :: String -> AttrSet -> AttrSet - ``` - - # Arguments - - - [domain] Root domain used - - [subdomainMap] A name value pair of subdomains and their virtualHost options - */ - toVHosts = domain: lib.mapAttrs' (name: lib.nameValuePair "${name}.${domain}"); -} |
