nixos-config/services/miniflux.nix

42 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2023-12-09 04:08:41 +01:00
{ config, ... }:
2021-12-11 19:40:53 +01:00
2023-12-09 04:08:41 +01:00
let
domain = "news.felschr.com";
port = 8002;
2024-05-26 16:45:38 +02:00
in
{
2023-12-10 15:42:28 +01:00
age.secrets.miniflux.file = ../secrets/miniflux/admin.age;
age.secrets.miniflux-oidc = {
file = ../secrets/miniflux/oidc.age;
group = "miniflux-secrets";
mode = "440";
};
2021-12-11 19:40:53 +01:00
services.miniflux = {
enable = true;
2022-05-04 03:02:47 +02:00
adminCredentialsFile = config.age.secrets.miniflux.path;
2023-12-09 04:08:41 +01:00
config = {
LISTEN_ADDR = "localhost:${toString port}";
BASE_URL = "https://${domain}";
OAUTH2_PROVIDER = "oidc";
OAUTH2_CLIENT_ID = "miniflux";
2023-12-10 15:42:28 +01:00
OAUTH2_CLIENT_SECRET_FILE = config.age.secrets.miniflux-oidc.path;
2023-12-09 04:08:41 +01:00
OAUTH2_REDIRECT_URL = "https://news.felschr.com/oauth2/oidc/callback";
OAUTH2_OIDC_DISCOVERY_ENDPOINT = "https://auth.felschr.com";
OAUTH2_USER_CREATION = "1";
};
2021-12-11 19:40:53 +01:00
};
2024-05-26 16:45:38 +02:00
systemd.services.miniflux.serviceConfig.SupplementaryGroups = [ "miniflux-secrets" ];
2023-12-10 15:42:28 +01:00
2021-12-11 19:40:53 +01:00
services.nginx = {
virtualHosts."news.felschr.com" = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://localhost:${toString port}";
2021-12-11 19:40:53 +01:00
};
};
2023-12-10 15:42:28 +01:00
users.groups.miniflux-secrets = { };
2021-12-11 19:40:53 +01:00
}