-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathglobals.nix
142 lines (133 loc) · 3.59 KB
/
globals.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
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
inputs,
config,
lib,
nodes,
...
}:
let
inherit (config) globals;
# Try to access the extra builtin we loaded via nix-plugins.
# Throw an error if that doesn't exist.
rageImportEncrypted =
assert lib.assertMsg (builtins ? extraBuiltins.rageImportEncrypted)
"The extra builtin 'rageImportEncrypted' is not available, so repo.secrets cannot be decrypted. Did you forget to add nix-plugins and point it to `./nix/extra-builtins.nix` ?";
builtins.extraBuiltins.rageImportEncrypted;
in
{
imports = [
(rageImportEncrypted inputs.self.secretsConfig.masterIdentities ./secrets/global.nix.age)
];
globals = {
net = {
home-wan = {
cidrv4 = "192.168.178.0/24";
hosts.fritzbox.id = 1;
hosts.ward.id = 2;
};
home-lan = {
vlans = {
services = {
id = 5;
cidrv4 = "192.168.5.0/24";
cidrv6 = "fd05::/64";
hosts.ward.id = 1;
hosts.sire.id = 2;
hosts.ward-adguardhome = {
id = 3;
inherit (nodes.ward-adguardhome.config.lib.microvm.interfaces.vlan-services) mac;
};
hosts.ward-web-proxy = {
id = 4;
inherit (nodes.ward-web-proxy.config.lib.microvm.interfaces.vlan-services) mac;
};
hosts.sausebiene.id = 5;
hosts.sire-samba = {
id = 10;
inherit (nodes.sire-samba.config.lib.microvm.interfaces.vlan-services) mac;
};
};
home = {
id = 10;
cidrv4 = "192.168.10.0/24";
cidrv6 = "fd10::/64";
hosts.ward.id = 1;
hosts.sire.id = 2;
hosts.sausebiene.id = 5;
};
devices = {
id = 20;
cidrv4 = "192.168.20.0/24";
cidrv6 = "fd20::/64";
hosts.ward.id = 1;
hosts.sire.id = 2;
hosts.sausebiene.id = 5;
hosts.scanner-ads-4300n = {
id = 23;
mac = globals.macs.scanner-ads-4300n;
};
hosts.epsondc44f7 = {
id = 30;
mac = globals.macs.epsondc44f7;
};
hosts.wallbox = {
id = 40;
mac = globals.macs.wallbox;
};
};
iot = {
id = 30;
cidrv4 = "192.168.30.0/24";
cidrv6 = "fd30::/64";
hosts.ward.id = 1;
hosts.sausebiene.id = 5;
hosts.bambulab-p1s = {
id = 22;
mac = globals.macs.bambulab-p1s;
};
};
guests = {
id = 50;
cidrv4 = "192.168.50.0/24";
cidrv6 = "fd50::/64";
hosts.ward.id = 1;
};
};
};
proxy-home = {
cidrv4 = "10.44.0.0/24";
cidrv6 = "fd00:44::/120";
};
};
monitoring = {
dns = {
cloudflare = {
server = "1.1.1.1";
domain = ".";
network = "internet";
};
google = {
server = "8.8.8.8";
domain = ".";
network = "internet";
};
};
ping = {
cloudflare = {
hostv4 = "1.1.1.1";
hostv6 = "2606:4700:4700::1111";
network = "internet";
};
google = {
hostv4 = "8.8.8.8";
hostv6 = "2001:4860:4860::8888";
network = "internet";
};
fritz-box = {
hostv4 = globals.net.home-wan.hosts.fritzbox.ipv4;
network = "home-wan";
};
};
};
};
}