modules#qbittorrent: add openFirewall
option
This commit is contained in:
parent
af861dd0f8
commit
45edaf673c
@ -47,6 +47,14 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Open services.qBittorrent.port to the outside network.
|
||||
'';
|
||||
};
|
||||
|
||||
openFilesLimit = mkOption {
|
||||
default = openFilesLimit;
|
||||
description = ''
|
||||
@ -67,6 +75,11 @@ in
|
||||
)
|
||||
];
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ cfg.port ];
|
||||
allowedUDPPorts = [ cfg.port ];
|
||||
};
|
||||
|
||||
systemd.services.qbittorrent = {
|
||||
after = [ "network.target" ];
|
||||
description = "qBittorrent Daemon";
|
||||
|
@ -7,6 +7,7 @@ in
|
||||
services.qbittorrent = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
users.groups.media.members = [ "qbittorrent" ];
|
||||
|
Loading…
Reference in New Issue
Block a user