nixos: services: sabnzbd: add 'port' option
This commit is contained in:
parent
f2ae223c66
commit
c8f9e002f6
1 changed files with 15 additions and 2 deletions
|
|
@ -2,11 +2,17 @@
|
|||
{ 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";
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 9090;
|
||||
example = 4242;
|
||||
description = "The port on which SABnzbd will listen for incoming HTTP traffic";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
@ -18,6 +24,13 @@ in
|
|||
configFile = null;
|
||||
# I want to configure servers outside of Nix
|
||||
allowConfigWrite = true;
|
||||
|
||||
settings = {
|
||||
misc = {
|
||||
host = "127.0.0.1";
|
||||
inherit (cfg) port;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Set-up media group
|
||||
|
|
@ -25,7 +38,7 @@ in
|
|||
|
||||
my.services.nginx.virtualHosts = {
|
||||
sabnzbd = {
|
||||
inherit port;
|
||||
inherit (cfg) port;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue