nixos/modules/services/rss-bridge/default.nix

50 lines
1.1 KiB
Nix
Raw Normal View History

2022-07-30 15:01:21 +02:00
# Get RSS feeds from websites that don't natively have one
{
config,
lib,
pkgs,
...
}:
2022-07-30 15:01:21 +02:00
let
cfg = config.my.services.rss-bridge;
2022-11-09 22:14:20 +01:00
domain = "rss-bridge.${config.networking.domain}";
2022-07-30 15:01:21 +02:00
in
{
options.my.services.rss-bridge = {
enable = lib.mkEnableOption "RSS-Bridge service";
};
config = lib.mkIf cfg.enable {
services.rss-bridge = {
enable = true;
config.system.enabled_bridges = [ "*" ]; # Whitelist all
virtualHost = null;
user = "caddy";
group = "caddy";
2025-02-13 19:43:13 +01:00
# TODO: with 25.05 this can be simplified via
# webserver = "caddy";
2022-07-30 15:01:21 +02:00
};
my.services.webserver.virtualHosts = [
{
subdomain = "rss-bridge";
extraConfig = ''
root * ${pkgs.rss-bridge}
php_fastcgi unix/${config.services.phpfpm.pools."rss-bridge".socket} {
env RSSBRIDGE_fileCache_path ${config.services.rss-bridge.dataDir}/cache/
}
file_server
'';
}
];
2022-07-30 15:01:21 +02:00
webapps.apps.rss-bridge = {
dashboard = {
name = "RSS-Bridge";
category = "other";
2022-07-30 15:01:21 +02:00
icon = "rss";
2023-11-12 20:39:44 +01:00
url = "https://${domain}";
2022-07-30 15:01:21 +02:00
};
};
};
}