main
1{lib, ...}: {
2 den.schema.host = {
3 options = {
4 address = let
5 ipvXOptions = ver: {
6 clearText = lib.mkOption {
7 description = "Clear text of public IPv${toString ver} address for this host.";
8 type = lib.types.nullOr lib.types.str;
9 default = null;
10 };
11 secret = {
12 name = lib.mkOption {
13 description = "Secret name of public IPv${toString ver} address for this host.";
14 type = lib.types.nullOr lib.types.str;
15 default = null;
16 };
17 file = lib.mkOption {
18 description = "Secret file of public IPv${toString ver} address for this host.";
19 type = lib.types.nullOr lib.types.path;
20 default = null;
21 };
22 };
23 tailscale = lib.mkOption {
24 description = "Clear text of tailscale IPv${toString ver} address for this host.";
25 type = lib.types.nullOr lib.types.str;
26 default = null;
27 };
28 };
29 in {
30 ipv4 = ipvXOptions 4;
31 ipv6 = ipvXOptions 6;
32 };
33 };
34 };
35}