bring local vars into scope

This commit is contained in:
Lyn 2024-11-12 03:46:56 +01:00
parent 65726d62c0
commit 90bbd821b0

View file

@ -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}"];