mirror of
https://github.com/ordinary-dev/nixos-config.git
synced 2024-09-19 19:30:28 +05:00
chore: change wireguard subnet to avoid conflicts
This commit is contained in:
parent
de591bd560
commit
f6eb3806a7
|
@ -8,15 +8,15 @@
|
||||||
interface = "0.0.0.0";
|
interface = "0.0.0.0";
|
||||||
access-control = [
|
access-control = [
|
||||||
"192.168.0.0/24 allow"
|
"192.168.0.0/24 allow"
|
||||||
"10.100.0.0/24 allow"
|
"10.101.0.0/24 allow"
|
||||||
];
|
];
|
||||||
local-zone = [
|
local-zone = [
|
||||||
"\"pp.comfycamp.space\" static"
|
"\"pp.comfycamp.space\" static"
|
||||||
"\"vault.comfycamp.space\" static"
|
"\"vault.comfycamp.space\" static"
|
||||||
];
|
];
|
||||||
local-data = [
|
local-data = [
|
||||||
"\"pp.comfycamp.space IN A 10.100.0.1\""
|
"\"pp.comfycamp.space IN A 10.101.0.1\""
|
||||||
"\"vault.comfycamp.space IN A 10.100.0.1\""
|
"\"vault.comfycamp.space IN A 10.101.0.1\""
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
forward-zone = [
|
forward-zone = [
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.wireguard.interfaces.wg0 = {
|
networking.wireguard.interfaces.wg0 = {
|
||||||
ips = ["10.100.0.1/24" ];
|
ips = ["10.101.0.1/24" ];
|
||||||
listenPort = 51820;
|
listenPort = 51820;
|
||||||
|
|
||||||
postSetup = ''
|
postSetup = ''
|
||||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o enp7s0 -j MASQUERADE
|
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.101.0.0/24 -o enp7s0 -j MASQUERADE
|
||||||
'';
|
'';
|
||||||
postShutdown = ''
|
postShutdown = ''
|
||||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o enp7s0 -j MASQUERADE
|
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.101.0.0/24 -o enp7s0 -j MASQUERADE
|
||||||
'';
|
'';
|
||||||
|
|
||||||
privateKeyFile = "/var/lib/wireguard/privkey";
|
privateKeyFile = "/var/lib/wireguard/privkey";
|
||||||
|
@ -23,12 +23,12 @@
|
||||||
{
|
{
|
||||||
# laptop
|
# laptop
|
||||||
publicKey = "awAVP/tkl0Z9PKEMTABjIXhblWSGHhIvYjBFp3C7YUk=";
|
publicKey = "awAVP/tkl0Z9PKEMTABjIXhblWSGHhIvYjBFp3C7YUk=";
|
||||||
allowedIPs = [ "10.100.0.2/32" ];
|
allowedIPs = [ "10.101.0.2/32" ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
# phone
|
# phone
|
||||||
publicKey = "zPUl9jrC8dFaPWKk92btHptEzr09KNgGbdwSfiT7rEM=";
|
publicKey = "zPUl9jrC8dFaPWKk92btHptEzr09KNgGbdwSfiT7rEM=";
|
||||||
allowedIPs = [ "10.100.0.3/32" ];
|
allowedIPs = [ "10.101.0.3/32" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
useACMEHost = "comfycamp.space";
|
useACMEHost = "comfycamp.space";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
listenAddresses = [
|
listenAddresses = [
|
||||||
"10.100.0.1"
|
"10.101.0.1"
|
||||||
];
|
];
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${toString config.services.photoprism.port}";
|
proxyPass = "http://127.0.0.1:${toString config.services.photoprism.port}";
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
useACMEHost = "comfycamp.space";
|
useACMEHost = "comfycamp.space";
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
listenAddresses = [
|
listenAddresses = [
|
||||||
"10.100.0.1"
|
"10.101.0.1"
|
||||||
];
|
];
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
||||||
|
|
Loading…
Reference in a new issue