split up wireguard stuff
This commit is contained in:
parent
e53feb78e4
commit
f081e8ff27
@ -18,6 +18,7 @@
|
|||||||
./services/gitea.nix
|
./services/gitea.nix
|
||||||
./services/minecraft.nix
|
./services/minecraft.nix
|
||||||
# ./services/soulseek.nix
|
# ./services/soulseek.nix
|
||||||
|
./services/wg.nix
|
||||||
./services/qbittorrent.nix
|
./services/qbittorrent.nix
|
||||||
./services/bitmagnet.nix
|
./services/bitmagnet.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@ -1,5 +1,23 @@
|
|||||||
{ pkgs, service_configs, ... }:
|
{ 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 = {
|
services.bitmagnet = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -17,5 +35,4 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
vpnNamespace = "wg";
|
vpnNamespace = "wg";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,21 +8,11 @@
|
|||||||
{
|
{
|
||||||
# network namespace that is proxied through mullvad
|
# network namespace that is proxied through mullvad
|
||||||
vpnNamespaces.wg = {
|
vpnNamespaces.wg = {
|
||||||
enable = true;
|
|
||||||
wireguardConfigFile = ../secrets/wg0.conf;
|
|
||||||
accessibleFrom = [
|
|
||||||
"192.168.0.0/24"
|
|
||||||
];
|
|
||||||
portMappings = [
|
portMappings = [
|
||||||
{
|
{
|
||||||
from = config.services.qbittorrent.webuiPort;
|
from = config.services.qbittorrent.webuiPort;
|
||||||
to = config.services.qbittorrent.webuiPort;
|
to = config.services.qbittorrent.webuiPort;
|
||||||
}
|
}
|
||||||
{
|
|
||||||
from = service_configs.ports.bitmagnet;
|
|
||||||
to = service_configs.ports.bitmagnet;
|
|
||||||
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
openVPNPorts = [
|
openVPNPorts = [
|
||||||
@ -30,11 +20,6 @@
|
|||||||
port = config.services.qbittorrent.webuiPort;
|
port = config.services.qbittorrent.webuiPort;
|
||||||
protocol = "both";
|
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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user