summaryrefslogtreecommitdiff
path: root/systems/atlas/nginx.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-02-08 21:20:51 -0500
committerseth <[email protected]>2024-02-09 01:17:16 -0500
commitac05391c228b1630614e6585124f183a90489414 (patch)
treee24244485f9f5cd5e9549126677bec38dd676115 /systems/atlas/nginx.nix
parent98e9edac4c79a6f4f723db9df79adf99ac3ffb51 (diff)
lib/nginx: init
Diffstat (limited to 'systems/atlas/nginx.nix')
-rw-r--r--systems/atlas/nginx.nix15
1 files changed, 3 insertions, 12 deletions
diff --git a/systems/atlas/nginx.nix b/systems/atlas/nginx.nix
index 29c76e8..001c4d5 100644
--- a/systems/atlas/nginx.nix
+++ b/systems/atlas/nginx.nix
@@ -1,21 +1,12 @@
{
config,
- lib,
+ inputs,
...
}: let
- mkProxy = endpoint: port: {
- "${endpoint}" = {
- proxyPass = "http://localhost:${toString port}";
- proxyWebsockets = true;
- };
- };
-
- toVHosts = lib.mapAttrs' (
- name: value: lib.nameValuePair "${name}.${config.networking.domain}" value
- );
+ inherit (inputs.self.lib.nginx) mkProxy toVHosts;
in {
services.nginx = {
- virtualHosts = toVHosts {
+ virtualHosts = toVHosts config.networking.domain {
miniflux = {
locations = mkProxy "/" "7000";
};