4 tv: tinc.config can access tinc.pubkey
This commit is contained in:
parent
7a40f89e01
commit
791a7e7997
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue