nixos/sabnzbd: add openFirewall
This commit is contained in:
parent
0db2b0471e
commit
d3d5b72c65
1 changed files with 12 additions and 0 deletions
|
@ -36,6 +36,14 @@ in
|
|||
default = "sabnzbd";
|
||||
description = lib.mdDoc "Group to run the service as";
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mdDoc ''
|
||||
Open ports in the firewall for the sabnzbd web interface
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -68,5 +76,9 @@ in
|
|||
ExecStart = "${lib.getBin cfg.package}/bin/sabnzbd -d -f ${cfg.configFile}";
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ 8080 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue