From 7875d2b5aeb6b785b1a7fdc4d5155a4480a64000 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sun, 17 Nov 2019 23:50:48 +0100 Subject: [PATCH] Set up Miniflux reverse proxy --- modules/webstack.nix | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/modules/webstack.nix b/modules/webstack.nix index 7ee4b0c..9a0118f 100644 --- a/modules/webstack.nix +++ b/modules/webstack.nix @@ -9,6 +9,7 @@ libressl gnumake php73Packages.composer + miniflux ]; services.nginx = { @@ -67,7 +68,7 @@ proxyPass = "http://localhost:3000/"; }; locations."/miniflux/" = { - proxyPass = "http://localhost:8080/"; + proxyPass = "http://localhost:8080/miniflux/"; }; locations."/wallabag/" = { root = "/var/lib/wallabag/web"; @@ -108,7 +109,7 @@ services.postgresql = { enable = true; package = pkgs.postgresql_11; - ensureDatabases = [ "gitea" "wallabag" "miniflux" ]; + ensureDatabases = [ "gitea" "wallabag" ]; ensureUsers = [ { name = "gitea"; @@ -118,10 +119,6 @@ name = "wallabag"; ensurePermissions = {"DATABASE wallabag" = "ALL PRIVILEGES";}; } - { - name = "miniflux"; - ensurePermissions = {"DATABASE miniflux" = "ALL PRIVILEGES";}; - } ]; authentication = lib.mkForce '' # Generated file; do not edit! @@ -162,15 +159,21 @@ }; }; - # Create php user + # Create php and group user users.users.php = { - group = "php"; + extraGroups = [ "php" ]; }; + users.groups.php = { + members = [ "php" ]; + }; + + # Miniflux configuration services.miniflux = { enable = true; + adminCredentialsFile = "/var/keys/miniflux/admin"; config = { - BASE_URL = "https://coolneng.duckdns.org"; + BASE_URL = "https://coolneng.duckdns.org/miniflux/"; }; };