services: add RSS-Bridge
This commit is contained in:
parent
04dd1bc671
commit
41c777d2e2
|
@ -107,6 +107,8 @@
|
|||
pirate.enable = true;
|
||||
# Regular backups
|
||||
postgresql-backup.enable = true;
|
||||
# RSS provider for websites that do not provide any feeds
|
||||
rss-bridge.enable = true;
|
||||
# Usenet client
|
||||
sabnzbd.enable = true;
|
||||
# Torrent client and webui
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
./nginx.nix
|
||||
./pirate.nix
|
||||
./postgresql-backup.nix
|
||||
./rss-bridge.nix
|
||||
./sabnzbd.nix
|
||||
./transmission.nix
|
||||
];
|
||||
|
|
25
services/rss-bridge.nix
Normal file
25
services/rss-bridge.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue