services: add RSS-Bridge

This commit is contained in:
Bruno BELANYI 2021-02-05 19:59:25 +01:00
parent 04dd1bc671
commit 41c777d2e2
3 changed files with 28 additions and 0 deletions

View file

@ -107,6 +107,8 @@
pirate.enable = true; pirate.enable = true;
# Regular backups # Regular backups
postgresql-backup.enable = true; postgresql-backup.enable = true;
# RSS provider for websites that do not provide any feeds
rss-bridge.enable = true;
# Usenet client # Usenet client
sabnzbd.enable = true; sabnzbd.enable = true;
# Torrent client and webui # Torrent client and webui

View file

@ -11,6 +11,7 @@
./nginx.nix ./nginx.nix
./pirate.nix ./pirate.nix
./postgresql-backup.nix ./postgresql-backup.nix
./rss-bridge.nix
./sabnzbd.nix ./sabnzbd.nix
./transmission.nix ./transmission.nix
]; ];

25
services/rss-bridge.nix Normal file
View file

@ -0,0 +1,25 @@
# Get RSS feeds from websites that don't natively have one
{ config, lib, ... }:
let
cfg = config.my.services.rss-bridge;
domain = config.networking.domain;
rss-bridgeDomain = "rss-bridge.${config.networking.domain}";
in
{
options.my.services.rss-bridge = {
enable = lib.mkEnableOption "RSS-Bridge service";
};
config = lib.mkIf cfg.enable {
services.rss-bridge = {
enable = true;
whitelist = [ "*" ]; # Whitelist all
virtualHost = rss-bridgeDomain; # Setup virtual host
};
services.nginx.virtualHosts."${rss-bridgeDomain}" = {
forceSSL = true;
useACMEHost = "${domain}";
};
};
}