flake/hosts/tyo0/services/miniflux.nix

29 lines
852 B
Nix
Raw Normal View History

2024-08-31 02:15:09 +00:00
{ lib, config, ... }:
2024-09-06 12:19:44 +00:00
let
port = config.lib.ports.miniflux;
in
{
2024-08-11 10:13:36 +00:00
services.miniflux = {
enable = true;
adminCredentialsFile = config.sops.secrets."miniflux/environment".path;
config = {
2024-09-06 12:19:44 +00:00
LISTEN_ADDR = "127.0.0.1:${toString port}";
2024-08-11 10:13:36 +00:00
BASE_URL = "https://rss.ny4.dev";
OAUTH2_PROVIDER = "oidc";
OAUTH2_CLIENT_ID = "miniflux";
# OAUTH2_CLIENT_SECRET = "replace_me"; # EnvironmentFile
OAUTH2_REDIRECT_URL = "https://rss.ny4.dev/oauth2/oidc/callback";
OAUTH2_OIDC_DISCOVERY_ENDPOINT = "https://id.ny4.dev/realms/ny4";
};
};
2024-08-31 02:15:09 +00:00
services.caddy.settings.apps.http.servers.srv0.routes = lib.singleton {
2024-09-20 17:38:01 +00:00
match = lib.singleton { host = [ "rss.ny4.dev" ]; };
2024-08-31 02:15:09 +00:00
handle = lib.singleton {
handler = "reverse_proxy";
2024-09-06 12:19:44 +00:00
upstreams = [ { dial = "localhost:${toString port}"; } ];
2024-08-31 02:15:09 +00:00
};
};
2024-08-11 10:13:36 +00:00
}