From 27fe9055334443370a86307ed08d51b2606f509d Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 23 Jul 2015 02:00:23 +0200 Subject: 4 tv: tinc.config can access tinc.pubkey --- 4lib/tv/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '4lib/tv') diff --git a/4lib/tv/default.nix b/4lib/tv/default.nix index 5eb9ac4..092a962 100644 --- a/4lib/tv/default.nix +++ b/4lib/tv/default.nix @@ -97,22 +97,22 @@ builtins // lib // rec { type = listOf hostname; }; tinc = mkOption { - type = submodule { + type = let net-config = config; in submodule ({ config, ... }: { options = { config = mkOption { type = str; apply = _: '' - ${optionalString (config.via != null) - (concatMapStringsSep "\n" (a: "Address = ${a}") config.via.addrs)} - ${concatMapStringsSep "\n" (a: "Subnet = ${a}") config.addrs} - ${config.tinc.pubkey} + ${optionalString (net-config.via != null) + (concatMapStringsSep "\n" (a: "Address = ${a}") net-config.via.addrs)} + ${concatMapStringsSep "\n" (a: "Subnet = ${a}") net-config.addrs} + ${config.pubkey} ''; }; pubkey = mkOption { type = str; }; }; - }; + }); }; }; }); -- cgit v1.2.3