-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.nix
51 lines (44 loc) · 1.28 KB
/
options.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Options.
{ lib, ... }:
with lib;
let
nodeModule = types.submodule {
options = {
name = mkOption {
type = types.str;
example = "amun";
description = "The node hostname part before '.xinutec.org' (required).";
};
ipv4 = mkOption {
type = types.str;
example = "219.38.29.10";
description = "The public IPv4 address of the node.";
};
ipv6 = mkOption {
type = types.str;
example = "2001:41d0:2:7a85::1";
description = "The public IPv6 address of the node.";
};
vpn = mkOption {
type = types.str;
example = "10.100.0.50";
description = "The internal VPN IPv4 address of the node (required).";
};
publicKey = mkOption {
type = types.str;
example = "9iISDdDl9g57OE+yhQMNJjAVsaBqHurf4iUjnZ9GQF4=";
description = "The Wireguard public key of the node (required).";
};
externalInterface = mkOption {
type = types.str;
example = "eth0";
description = "External network interface for the node (check ifconfig for the interface with the public IP address).";
};
};
};
in {
options.node = mkOption {
type = nodeModule;
description = "The current machine node configuration.";
};
}