Some checks failed
Weekly NixOS Build & Cache / build-and-cache (push) Failing after 1m55s
22 lines
485 B
Nix
22 lines
485 B
Nix
{ lib, config, ... }:
|
|
let
|
|
cfg = config.my.servers.sabnzbd;
|
|
in
|
|
{
|
|
options.my.servers.sabnzbd = {
|
|
enable = lib.mkEnableOption "SABnzbd Usenet downloader";
|
|
port = lib.mkOption {
|
|
type = lib.types.int;
|
|
default = 3399;
|
|
description = "The port to access sabnzbd web-ui";
|
|
};
|
|
};
|
|
config = lib.mkIf cfg.enable {
|
|
my.network.firewall.additionalPorts = [ cfg.port ];
|
|
services.sabnzbd = {
|
|
inherit (cfg) enable;
|
|
group = "piracy";
|
|
};
|
|
};
|
|
}
|