subnet parameters
This commit is contained in:
@@ -50,14 +50,9 @@ in
|
||||
miniserver = "192.168.1.100";
|
||||
workstation = "192.168.100.18";
|
||||
vps = "45.33.0.228";
|
||||
wg-s = "10.77.0.0";
|
||||
wg-vps = "10.77.0.1";
|
||||
wg-server = "10.77.0.2";
|
||||
wg-gs = "10.9.0.0";
|
||||
wg-g0 = "10.9.0.1";
|
||||
wg-g1 = "10.9.0.2";
|
||||
wg-friends = "10.8.0.0";
|
||||
wg-friend0 = "10.8.0.1";
|
||||
wg-guest1 = "10.9.0.2";
|
||||
wg-friend1 = "10.8.0.2";
|
||||
wg-friend2 = "10.8.0.3";
|
||||
wg-friend3 = "10.8.0.4";
|
||||
@@ -65,6 +60,24 @@ in
|
||||
};
|
||||
description = "Set of IP's for all my computers.";
|
||||
};
|
||||
subnets = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = {
|
||||
wg-homelab = "10.77.0.0/24";
|
||||
wg-friends = "10.8.0.0/24";
|
||||
wg-guests = "10.9.0.0/24";
|
||||
};
|
||||
description = "Set of subnets for WireGuard networks.";
|
||||
};
|
||||
wgInterfaces = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = {
|
||||
wg-homelab = "10.77.0.1/24";
|
||||
wg-friends = "10.8.0.1/24";
|
||||
wg-guests = "10.9.0.1/24";
|
||||
};
|
||||
description = "WireGuard interface IPs for the VPS.";
|
||||
};
|
||||
interfaces = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
default = {
|
||||
|
||||
@@ -14,9 +14,9 @@ in
|
||||
firewall.allowedUDPPorts = [ port ];
|
||||
wireguard.interfaces.wg0 = {
|
||||
ips = [
|
||||
"${config.my.ips.wg-vps}/24"
|
||||
"${config.my.ips.wg-friend0}/24"
|
||||
"${config.my.ips.wg-g0}/24"
|
||||
config.my.wgInterfaces.wg-homelab
|
||||
config.my.wgInterfaces.wg-friends
|
||||
config.my.wgInterfaces.wg-guests
|
||||
];
|
||||
listenPort = port;
|
||||
postSetup = "";
|
||||
|
||||
Reference in New Issue
Block a user