split up wireguard stuff
This commit is contained in:
@@ -1,5 +1,23 @@
|
||||
{ pkgs, service_configs, ... }:
|
||||
{
|
||||
vpnNamespaces.wg = {
|
||||
portMappings = [
|
||||
{
|
||||
from = service_configs.ports.bitmagnet;
|
||||
to = service_configs.ports.bitmagnet;
|
||||
|
||||
}
|
||||
];
|
||||
|
||||
openVPNPorts = [
|
||||
{
|
||||
# TODO! make an issue about this variable
|
||||
port = service_configs.ports.bitmagnet;
|
||||
protocol = "both";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.bitmagnet = {
|
||||
enable = true;
|
||||
|
||||
@@ -17,5 +35,4 @@
|
||||
enable = true;
|
||||
vpnNamespace = "wg";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -8,21 +8,11 @@
|
||||
{
|
||||
# network namespace that is proxied through mullvad
|
||||
vpnNamespaces.wg = {
|
||||
enable = true;
|
||||
wireguardConfigFile = ../secrets/wg0.conf;
|
||||
accessibleFrom = [
|
||||
"192.168.0.0/24"
|
||||
];
|
||||
portMappings = [
|
||||
{
|
||||
from = config.services.qbittorrent.webuiPort;
|
||||
to = config.services.qbittorrent.webuiPort;
|
||||
}
|
||||
{
|
||||
from = service_configs.ports.bitmagnet;
|
||||
to = service_configs.ports.bitmagnet;
|
||||
|
||||
}
|
||||
];
|
||||
|
||||
openVPNPorts = [
|
||||
@@ -30,11 +20,6 @@
|
||||
port = config.services.qbittorrent.webuiPort;
|
||||
protocol = "both";
|
||||
}
|
||||
{
|
||||
# TODO! make an issue about this variable
|
||||
port = service_configs.ports.bitmagnet;
|
||||
protocol = "both";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
12
services/wg.nix
Normal file
12
services/wg.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, service_configs, ... }:
|
||||
{
|
||||
|
||||
# network namespace that is proxied through mullvad
|
||||
vpnNamespaces.wg = {
|
||||
enable = true;
|
||||
wireguardConfigFile = ../secrets/wg0.conf;
|
||||
accessibleFrom = [
|
||||
"192.168.0.0/24"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user