Merge pull request 'Vars/docs minor fixes' (#2746) from hsjobeki/clan-core:vars/misc into main
This commit is contained in:
@@ -60,7 +60,10 @@ in
|
|||||||
description = ''
|
description = ''
|
||||||
A list of other generators that this generator depends on.
|
A list of other generators that this generator depends on.
|
||||||
The output values of these generators will be available to the generator script as files.
|
The output values of these generators will be available to the generator script as files.
|
||||||
For example, the file 'file1' of a dependency named 'dep1' will be available via $in/dep1/file1.
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
**A file `file1` of a generator named `dep1` will be available via `$in/dep1/file1`**
|
||||||
'';
|
'';
|
||||||
type = listOf str;
|
type = listOf str;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
@@ -321,9 +324,11 @@ in
|
|||||||
description = ''
|
description = ''
|
||||||
The script to run to generate the files.
|
The script to run to generate the files.
|
||||||
The script will be run with the following environment variables:
|
The script will be run with the following environment variables:
|
||||||
|
|
||||||
- $in: The directory containing the output values of all declared dependencies
|
- $in: The directory containing the output values of all declared dependencies
|
||||||
- $out: The output directory to put the generated files
|
- $out: The output directory to put the generated files
|
||||||
- $prompts: The directory containing the prompted values as files
|
- $prompts: The directory containing the prompted values as files
|
||||||
|
|
||||||
The script should produce the files specified in the 'files' attribute under $out.
|
The script should produce the files specified in the 'files' attribute under $out.
|
||||||
'';
|
'';
|
||||||
type = either str path;
|
type = either str path;
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ def create_identity() -> Identity:
|
|||||||
|
|
||||||
def compute_zerotier_ip(network_id: str, identity: Identity) -> ipaddress.IPv6Address:
|
def compute_zerotier_ip(network_id: str, identity: Identity) -> ipaddress.IPv6Address:
|
||||||
assert len(network_id) == 16, (
|
assert len(network_id) == 16, (
|
||||||
"network_id must be 16 characters long, got {network_id}"
|
f"network_id must be 16 characters long, got '{network_id}'"
|
||||||
)
|
)
|
||||||
nwid = int(network_id, 16)
|
nwid = int(network_id, 16)
|
||||||
node_id = int(identity.node_id(), 16)
|
node_id = int(identity.node_id(), 16)
|
||||||
|
|||||||
Reference in New Issue
Block a user