-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrealm_library.nix
More file actions
111 lines (102 loc) · 2.66 KB
/
realm_library.nix
File metadata and controls
111 lines (102 loc) · 2.66 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# systems_library.nix
#
# Define a unique per-box variables
#
{
pkgs,
config,
lib,
...
}: let
trueByDefault = true;
in {
options = {};
options.StPeters7965 = with lib; {
myHostName = lib.mkOption {
type = lib.types.str;
default = "new.server";
description = ''
What is our unique IP hostname?
'';
};
my4xIP = lib.mkOption {
type = lib.types.int;
default = 1;
description = ''
What is the last 3 digits of our unique v4 IP?
'';
};
ip_v4_block = lib.mkOption {
type = lib.types.str;
default = "192.168.0";
description = ''
Which LAN which unroutable we expect to be on?
'';
};
ip_v4_mask = lib.mkOption {
type = lib.types.int;
default = 24;
description = ''
Which Subnet Mask should we use with our ip_v4_block?
'';
};
domain = lib.mkOption {
type = lib.types.str;
default = "7965stpeters.local";
description = ''
Which LAN FQDN we expect to be on?
'';
};
X11Forwarding = lib.mkOption {
type = lib.types.bool;
default = trueByDefault;
description = ''
enables X11Forwarding in SSHD.
'';
};
k3sCfg = lib.mkOption {
type = with types;
submodule {
options = {
role = mkOption {
type = lib.types.enum ["none" "proxy" "primary" "manager" "agent"];
default = "none";
description = ''
Used to set up what job this box does under k3srnetes.
[none | proxy | manager | agent ]
'';
};
dns_zone = lib.mkOption {
type = lib.types.str;
default = "k3s";
description = ''
What zone is this sitting on for DNS?
'';
};
ip_v4_block = lib.mkOption {
type = lib.types.str;
default = "192.168.11";
description = ''
Which LAN which /24 unroutable we expect to be on?
'';
};
my4xIP = lib.mkOption {
type = lib.types.int;
default = 1;
description = ''
What is the last 3 digits of our unique v4 IP?
'';
};
ip_v4_mask = lib.mkOption {
type = lib.types.int;
default = 29;
description = ''
Which Subnet Mask should we use with our ip_v4_block?
(Default is 8 IPs, 192.168.X.0 - 192.168.X.7)
'';
};
};
}; #submodule
}; # k3sCfg
};
}