mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
hosts: update Wireguard setup
This commit is contained in:
parent
213ecb8598
commit
c8b55c278a
@ -201,14 +201,16 @@ in
|
||||
networking.wg-quick.interfaces.wireguard0 = {
|
||||
privateKeyFile = config.sops.secrets."ni/wireguard/private-key".path;
|
||||
|
||||
dns = with wireguardPeers.server; [ IPv4 IPv6 ];
|
||||
|
||||
address = with wireguardPeers.desktop; [
|
||||
"${IPv4}/32"
|
||||
"${IPv6}/128"
|
||||
"${IPv4}/24"
|
||||
"${IPv6}/96"
|
||||
];
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = 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;
|
||||
allowedIPs = wireguardAllowedIPs;
|
||||
endpoint = "${interfaces.main'.IPv4.address}:${toString wireguardPort}";
|
||||
|
@ -9,8 +9,8 @@ let
|
||||
|
||||
wireguardIFName = "wireguard0";
|
||||
|
||||
desktopPeerAddresses = with wireguardPeers.desktop; [ "${IPv4}/32" "${IPv6}/128" ];
|
||||
phonePeerAddresses = with wireguardPeers.phone; [ "${IPv4}/32" "${IPv6}/128" ];
|
||||
desktopPeerAddresses = with wireguardPeers.desktop; [ "${IPv4}/24" "${IPv6}/96" ];
|
||||
phonePeerAddresses = with wireguardPeers.phone; [ "${IPv4}/24" "${IPv6}/96" ];
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ pkgs.wireguard-tools ];
|
||||
|
Loading…
Reference in New Issue
Block a user