Bruno BELANYI
6038d0df60
Its configuration isn't declarative :-(. Notably, the port needs to be changed from '8080' to '9090' in its configuration file (at '/var/lib/sabnzbd/').
29 lines
624 B
Nix
29 lines
624 B
Nix
# Usenet binary client.
|
|
{ config, lib, ... }:
|
|
let
|
|
cfg = config.my.services.sabnzbd;
|
|
|
|
domain = config.networking.domain;
|
|
sabnzbdDomain = "sabnzbd.${domain}";
|
|
port = 9090; # NOTE: not declaratively set...
|
|
in
|
|
{
|
|
options.my.services.sabnzbd = with lib; {
|
|
enable = mkEnableOption "SABnzbd binary news reader";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.sabnzbd = {
|
|
enable = true;
|
|
group = "media";
|
|
};
|
|
|
|
services.nginx.virtualHosts."${sabnzbdDomain}" = {
|
|
forceSSL = true;
|
|
useACMEHost = domain;
|
|
|
|
locations."/".proxyPass = "http://localhost:${toString port}";
|
|
};
|
|
};
|
|
}
|