mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 12:54:38 -05:00
feat: wireguard test
This commit is contained in:
parent
c6ea717181
commit
c6c3e4b3a4
3 changed files with 19 additions and 17 deletions
|
@ -9,7 +9,8 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
port = configHelpers.service.ports.port0;
|
port = configHelpers.service.ports.port0;
|
||||||
bind_address = ceres.wireguard.ip0;
|
bind_address =
|
||||||
|
if configHelpers.hostname == ceres.name then ceres.wireguard.ip0 else configHelpers.localhost;
|
||||||
secret_key = config.sops.secrets.searx-key.path;
|
secret_key = config.sops.secrets.searx-key.path;
|
||||||
limiter = false;
|
limiter = false;
|
||||||
public_instance = false;
|
public_instance = false;
|
||||||
|
|
|
@ -28,7 +28,7 @@ in
|
||||||
|
|
||||||
wireguard.interfaces = {
|
wireguard.interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
ips = [ "${ceres.wireguard.ip0}/24" ];
|
ips = [ "${ceres.wireguard.ip0}/32" ];
|
||||||
listenPort = service.ports.port1;
|
listenPort = service.ports.port1;
|
||||||
privateKeyFile = config.sops.secrets."${service.name}-private".path;
|
privateKeyFile = config.sops.secrets."${service.name}-private".path;
|
||||||
peers = [
|
peers = [
|
||||||
|
|
|
@ -6,21 +6,22 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
wireguard.interfaces.wg0 = {
|
wireguard.interfaces = {
|
||||||
ips = [ "${mars.wireguard.ip0}/24" ];
|
wg0 = {
|
||||||
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
|
ips = [ "${mars.wireguard.ip0}/32" ];
|
||||||
peers = [
|
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
|
||||||
{
|
peers = [
|
||||||
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
|
{
|
||||||
allowedIPs = [
|
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
|
||||||
"10.100.0.0/24"
|
allowedIPs = [
|
||||||
"${ceres.wireguard.ip0}/24"
|
"${ceres.wireguard.ip0}/32"
|
||||||
"192.168.1.0/24"
|
"192.168.1.0/24"
|
||||||
];
|
];
|
||||||
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
|
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue