2021-02-01 16:25:34 +01:00
|
|
|
# Usenet binary client.
|
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.my.services.sabnzbd;
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
|
2021-09-15 15:57:23 +02:00
|
|
|
# Set-up media group
|
|
|
|
users.groups.media = { };
|
|
|
|
|
2021-08-24 23:05:10 +02:00
|
|
|
my.services.nginx.virtualHosts = [
|
|
|
|
{
|
|
|
|
subdomain = "sabnzbd";
|
|
|
|
inherit port;
|
|
|
|
}
|
|
|
|
];
|
2021-02-01 16:25:34 +01:00
|
|
|
};
|
|
|
|
}
|