masive rewriting and setup of server files
This commit is contained in:
@@ -5,13 +5,6 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = 9091;
|
||||
ports = [
|
||||
port
|
||||
51411
|
||||
51412
|
||||
51413
|
||||
];
|
||||
bencodepy = pkgs.python3Packages.buildPythonPackage {
|
||||
pname = "bencodepy";
|
||||
version = "0.9.5";
|
||||
@@ -43,7 +36,14 @@ let
|
||||
in
|
||||
{
|
||||
options.my.servers = {
|
||||
qbittorrent.enable = lib.mkEnableOption "enable";
|
||||
qbittorrent = {
|
||||
enable = lib.mkEnableOption "enable";
|
||||
port = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 9091;
|
||||
description = "The port to access qbittorrent web-ui";
|
||||
};
|
||||
};
|
||||
unpackerr.enable = lib.mkEnableOption "enable";
|
||||
};
|
||||
config = lib.mkIf config.my.servers.qbittorrent.enable {
|
||||
@@ -97,9 +97,17 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = ports;
|
||||
allowedUDPPorts = ports;
|
||||
};
|
||||
networking.firewall =
|
||||
let
|
||||
ports = [
|
||||
51411
|
||||
51412
|
||||
51413
|
||||
];
|
||||
in
|
||||
{
|
||||
allowedTCPPorts = ports ++ [ config.my.servers.qbittorrent.port ];
|
||||
allowedUDPPorts = ports;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user