mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 21:04:38 -05:00
feat: wireguard test
This commit is contained in:
parent
9c8890926e
commit
6fb7b5504d
7 changed files with 82 additions and 42 deletions
|
@ -5,23 +5,29 @@ let
|
|||
service = wireGuard;
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
wireguard.interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "${mars.wireguard.ip0}/24" ];
|
||||
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
|
||||
allowedIPs = [
|
||||
"${ceres.wireguard.ip0}/32"
|
||||
"192.168.1.0/24"
|
||||
];
|
||||
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = [
|
||||
"${mars.wireguard.ip0}/24"
|
||||
"fdc9:281f:04d7:9ee9::2/64"
|
||||
];
|
||||
dns = [
|
||||
"${ceres.wireguard.ip0}"
|
||||
"fdc9:281f:04d7:9ee9::1"
|
||||
];
|
||||
privateKeyFile = config.sops.secrets."${service.name}-mars-private".path;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "fs58+Kz+eG9qAXvvMB2NkW+wa88yP61uam4HHWaBJVw=";
|
||||
presharedKeyFile = config.sops.secrets."${service.name}-public".path;
|
||||
allowedIPs = [
|
||||
"0.0.0.0/0"
|
||||
"::/0"
|
||||
];
|
||||
endpoint = "${web.remotehost.address0}:${builtins.toString service.ports.port1}";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -43,6 +49,7 @@ in
|
|||
[
|
||||
"mars-private"
|
||||
"mars-public"
|
||||
"public"
|
||||
]
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue