aboutsummaryrefslogtreecommitdiffstats
path: root/modules/vhack/mi/miniflux
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-30 14:05:39 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-07-30 14:05:39 +0200
commitc153a351659e4596acfc31f00bf594343cbfcd68 (patch)
treea9ed83de07711d6424fbea09aad28891bae5bfe4 /modules/vhack/mi/miniflux
parenthosts/server3: Setup prometheus server in agent mode (diff)
downloadnixos-server-c153a351659e4596acfc31f00bf594343cbfcd68.zip
modules: Use namespaces
That might make it easier in the future to merge different server configs together (and thusly facilitate code-reuse.).
Diffstat (limited to 'modules/vhack/mi/miniflux')
-rw-r--r--modules/vhack/mi/miniflux/module.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/modules/vhack/mi/miniflux/module.nix b/modules/vhack/mi/miniflux/module.nix
new file mode 100644
index 0000000..0075bca
--- /dev/null
+++ b/modules/vhack/mi/miniflux/module.nix
@@ -0,0 +1,55 @@
+{
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.vhack.miniflux;
+in {
+ options.vhack.miniflux = {
+ enable = lib.mkEnableOption "miniflux, an simple web rss reading software";
+ domain = lib.mkOption {
+ type = lib.types.str;
+ description = "The primary domain miniflux should be served on";
+ };
+ extraDomains = lib.mkOption {
+ type = lib.types.listOf lib.types.str;
+ description = "Additional domains to serve miniflux on";
+ default = [];
+ };
+ adminCredentialsFile = lib.mkOption {
+ type = lib.types.path;
+ description = "The age encrypted admin credentials file passed to agenix";
+ };
+ };
+ config = lib.mkIf cfg.enable {
+ age.secrets = {
+ minifluxAdmin = {
+ file = cfg.adminCredentialsFile;
+ mode = "700";
+ owner = "root";
+ group = "root";
+ };
+ };
+ services.miniflux = {
+ enable = true;
+ config = {
+ LISTEN_ADDR = "127.0.0.1:5892";
+ };
+ adminCredentialsFile = config.age.secrets.minifluxAdmin.path;
+ };
+
+ vhack = {
+ nginx.enable = true;
+ postgresql.enable = true;
+ };
+ services.nginx = {
+ virtualHosts.${cfg.domain} = {
+ locations."/".proxyPass = "http://${config.services.miniflux.config.LISTEN_ADDR}";
+
+ enableACME = true;
+ forceSSL = true;
+ serverAliases = cfg.extraDomains;
+ };
+ };
+ };
+}