summaryrefslogtreecommitdiff
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
parent0790e72af536821ab862ccef2ae2038dd9cef33a (diff)
lib: drop
I don't really need these nginx functions
-rw-r--r--README.md4
-rw-r--r--flake.nix1
-rw-r--r--lib/default.nix11
-rw-r--r--lib/nginx.nix61
-rw-r--r--systems/atlas/nginx.nix14
5 files changed, 7 insertions, 84 deletions
diff --git a/README.md b/README.md
index bf7f0a3..a52c3d4 100644
--- a/README.md
+++ b/README.md
@@ -18,10 +18,6 @@ greasy taco i love
Pieces meant for maintaining this flake
-## lib/
-
-Small functions I like to use around here
-
## modules/
Sets of modules meant for NixOS and
diff --git a/flake.nix b/flake.nix
index 1371611..490f8b7 100644
--- a/flake.nix
+++ b/flake.nix
@@ -22,7 +22,6 @@
inputs.getchpkgs.flakeModules.configurations
./flake
- ./lib
./modules
./openwrt
./systems
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}");
-}
diff --git a/systems/atlas/nginx.nix b/systems/atlas/nginx.nix
index bdd3cc3..57c2b0f 100644
--- a/systems/atlas/nginx.nix
+++ b/systems/atlas/nginx.nix
@@ -1,12 +1,12 @@
-{ config, inputs, ... }:
-let
- inherit (inputs.self.lib.nginx) mkProxy toVHosts;
-in
+{ config, ... }:
+
{
services.nginx = {
- virtualHosts = toVHosts config.networking.domain {
- miniflux = {
- locations = mkProxy "/" "7000";
+ virtualHosts = {
+ "miniflux.getchoo.com" = {
+ locations."/" = {
+ proxyPass = "http://${config.services.miniflux.config.LISTEN_ADDR}";
+ };
};
};
};