aboutsummaryrefslogtreecommitdiff
path: root/modules/miniflux.nix
blob: 8020a756505a69baa0e503ac4db0a9c4e633a1f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ config, ... }:

# Miniflux RSS/Atom reader.
# PostgreSQL is enabled automatically by the NixOS miniflux module.
# The admin user is created on first startup from the sops credentials file.
#
# Credentials file format (stored encrypted in secrets/secrets.yaml):
#   ADMIN_USERNAME=admin
#   ADMIN_PASSWORD=your-strong-password-here
{
  services.miniflux = {
    enable = true;

    # The NixOS module reads ADMIN_USERNAME and ADMIN_PASSWORD from this file
    # and sets CREATE_ADMIN=1 on first run to seed the database.
    adminCredentialsFile = config.sops.secrets."miniflux/admin".path;

    config = {
      # Listen only on localhost; Caddy handles public HTTPS
      LISTEN_ADDR = "127.0.0.1:8080";
      BASE_URL = "https://rss.karanj.com";

      # Log level: info in production
      LOG_LEVEL = "info";

      # Polling: fetch new articles every 15 minutes
      POLLING_FREQUENCY = "15";

      # Cleanup old read articles after 90 days
      CLEANUP_ARCHIVE_READ_DAYS = "90";
    };
  };
}