summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSeth Flynn <[email protected]>2025-02-08 14:10:33 -0500
committerSeth Flynn <[email protected]>2025-02-08 15:17:18 -0500
commit9db83aab18d17eebeea667938ba3a49b2207451e (patch)
tree23915b055f5bf3766a7716b5ba219cc85da46ebb /lib
parent0790e72af536821ab862ccef2ae2038dd9cef33a (diff)
lib: drop
I don't really need these nginx functions
Diffstat (limited to 'lib')
-rw-r--r--lib/default.nix11
-rw-r--r--lib/nginx.nix61
2 files changed, 0 insertions, 72 deletions
diff --git a/lib/default.nix b/lib/default.nix
deleted file mode 100644
index d7fb959..0000000
--- a/lib/default.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ lib, ... }:
-
-{
- flake.lib = lib.makeExtensible (
- final:
-
- lib.mapAttrs (lib.const (lib.flip import { inherit lib final; })) {
- nginx = ./nginx.nix;
- }
- );
-}
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}");
-}