mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
hosts/ni: update Wireguard interface
This commit is contained in:
parent
fa7b1796b4
commit
670361faaa
@ -215,12 +215,6 @@ in
|
|||||||
# others might be using systemd-networkd).
|
# others might be using systemd-networkd).
|
||||||
networking.wg-quick.interfaces.wireguard0 = {
|
networking.wg-quick.interfaces.wireguard0 = {
|
||||||
privateKeyFile = config.sops.secrets."ni/wireguard/private-key".path;
|
privateKeyFile = config.sops.secrets."ni/wireguard/private-key".path;
|
||||||
|
|
||||||
dns = with interfaces.internal; [
|
|
||||||
IPv4.address
|
|
||||||
IPv6.address
|
|
||||||
];
|
|
||||||
|
|
||||||
listenPort = wireguardPort;
|
listenPort = wireguardPort;
|
||||||
|
|
||||||
address = with wireguardPeers.desktop; [
|
address = with wireguardPeers.desktop; [
|
||||||
@ -229,12 +223,20 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
peers = [
|
peers = [
|
||||||
|
# The "server" peer.
|
||||||
{
|
{
|
||||||
publicKey = lib.removeSuffix "\n" (lib.readFile ../plover/files/wireguard/wireguard-public-key-plover);
|
publicKey = lib.removeSuffix "\n" (lib.readFile ../plover/files/wireguard/wireguard-public-key-plover);
|
||||||
presharedKeyFile = config.sops.secrets."ni/wireguard/preshared-keys/plover".path;
|
presharedKeyFile = config.sops.secrets."ni/wireguard/preshared-keys/plover".path;
|
||||||
allowedIPs = wireguardAllowedIPs;
|
allowedIPs = wireguardAllowedIPs;
|
||||||
endpoint = "${interfaces.main'.IPv4.address}:${toString wireguardPort}";
|
endpoint = "${interfaces.main'.IPv4.address}:${toString wireguardPort}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# The "phone" peer.
|
||||||
|
{
|
||||||
|
publicKey = lib.removeSuffix "\n" (lib.readFile ../plover/files/wireguard/wireguard-public-key-phone);
|
||||||
|
presharedKeyFile = config.sops.secrets."ni/wireguard/preshared-keys/phone".path;
|
||||||
|
allowedIPs = wireguardAllowedIPs;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user