bring local vars into scope
This commit is contained in:
parent
65726d62c0
commit
90bbd821b0
1 changed files with 5 additions and 4 deletions
|
@ -4,15 +4,16 @@
|
||||||
lib,
|
lib,
|
||||||
cfg,
|
cfg,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
# helper vars to prettify
|
||||||
|
currentHost = lyn.network.hosts.${networking.hostName};
|
||||||
|
wireguardPort = currentHost.wg.port;
|
||||||
|
in {
|
||||||
opt.useIPv6 = lib.mkOption {
|
opt.useIPv6 = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
description = "Whether to use IPv6. Defaults to true";
|
description = "Whether to use IPv6. Defaults to true";
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
# helper vars to prettify
|
|
||||||
currentHost = lyn.network.hosts.${networking.hostName};
|
|
||||||
wireguardPort = currentHost.wg.port;
|
|
||||||
|
|
||||||
networking.wireguard.interfaces.wg0 = {
|
networking.wireguard.interfaces.wg0 = {
|
||||||
ips = ["${lyn.network.IPv4.wg_subnet}"];
|
ips = ["${lyn.network.IPv4.wg_subnet}"];
|
||||||
|
|
Loading…
Reference in a new issue