From f073d76dbd6d0a1c77c32108140a6e4b0aa7cfe5 Mon Sep 17 00:00:00 2001 From: Seth Flynn Date: Sat, 8 Feb 2025 15:44:53 -0500 Subject: atlas: fix miniflux's unix socket --- systems/atlas/miniflux.nix | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'systems') diff --git a/systems/atlas/miniflux.nix b/systems/atlas/miniflux.nix index 884cf7a..6d3f8ca 100644 --- a/systems/atlas/miniflux.nix +++ b/systems/atlas/miniflux.nix @@ -1,4 +1,9 @@ -{ config, secretsDir, ... }: +{ + config, + lib, + secretsDir, + ... +}: { age.secrets.miniflux.file = secretsDir + "/miniflux.age"; @@ -9,7 +14,6 @@ adminCredentialsFile = config.age.secrets.miniflux.path; config = { BASE_URL = "https://miniflux.${config.networking.domain}"; - LISTEN_ADDR = "/run/miniflux"; }; }; @@ -17,10 +21,21 @@ virtualHosts = { "miniflux.getchoo.com" = { locations."/" = { - proxyPass = "http://unix:${config.services.miniflux.config.LISTEN_ADDR}"; + proxyPass = "http://unix:${lib.head config.systemd.sockets.miniflux.listenStreams}"; }; }; }; }; }; + + systemd = { + services.miniflux = { + requires = [ "miniflux.socket" ]; + }; + + sockets.miniflux = { + wantedBy = [ "sockets.target" ]; + listenStreams = [ "/run/miniflux.sock" ]; + }; + }; } -- cgit v1.2.3