diff options
author | azahi <azat@bahawi.net> | 2025-02-17 02:21:56 +0300 |
---|---|---|
committer | azahi <azat@bahawi.net> | 2025-02-17 02:21:56 +0300 |
commit | 59180328cda59817d71cd58c8f48ead047375064 (patch) | |
tree | 2cdd7d1bfa309839ef624c19daf283f510aacf69 /modules/wireguard.nix | |
parent | 2025-02-05 (diff) |
2025-02-17
Diffstat (limited to 'modules/wireguard.nix')
-rw-r--r-- | modules/wireguard.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/wireguard.nix b/modules/wireguard.nix index bb5daad..98addc8 100644 --- a/modules/wireguard.nix +++ b/modules/wireguard.nix @@ -155,20 +155,20 @@ in }) (lib.mkIf cfg.client.enable { networking.wg-quick.interfaces.${cfg.interface} = lib.mkMerge [ - (with this.wireguard; { + { type = "amneziawg"; privateKeyFile = config.secrets."wireguard-private-key-${this.hostname}".path; - address = [ + address = with this.wireguard; [ "${ipv4.address}/16" "${ipv6.address}/16" ]; inherit extraOptions; - }) + } (with cfg.server; { peers = [ { inherit publicKey; - endpoint = "${address}:${port |> toString}"; + endpoint = "${address}:${toString port}"; allowedIPs = if cfg.client.enableTrafficRouting then [ |