From 90bbd821b034ec802813f6be6d37521bc4dfbbf7 Mon Sep 17 00:00:00 2001 From: Lyn Date: Tue, 12 Nov 2024 03:46:56 +0100 Subject: [PATCH] bring local vars into scope --- modules/services/wgautomesh.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/services/wgautomesh.nix b/modules/services/wgautomesh.nix index e127348..2cd8ec9 100644 --- a/modules/services/wgautomesh.nix +++ b/modules/services/wgautomesh.nix @@ -4,15 +4,16 @@ lib, cfg, ... -}: { +}: let + # helper vars to prettify + currentHost = lyn.network.hosts.${networking.hostName}; + wireguardPort = currentHost.wg.port; +in { opt.useIPv6 = lib.mkOption { type = lib.types.bool; description = "Whether to use IPv6. Defaults to true"; default = true; }; - # helper vars to prettify - currentHost = lyn.network.hosts.${networking.hostName}; - wireguardPort = currentHost.wg.port; networking.wireguard.interfaces.wg0 = { ips = ["${lyn.network.IPv4.wg_subnet}"];