1
0
Fork 0
mirror of https://github.com/mdlayher/homelab.git synced 2024-12-14 11:47:32 +00:00
mdlayher-homelab/nixos/lib/vars.nix

28 lines
600 B
Nix
Raw Normal View History

# Variables referenced two or more places in the configuration.
let
# Import computed host/interface data from vars.json.
2020-04-28 18:12:30 +00:00
gen = builtins.fromJSON (builtins.readFile ./vars.json);
hosts = gen.hosts;
interfaces = gen.interfaces;
wireguard = gen.wireguard;
server_ipv4 = gen.server_ipv4;
server_ipv6 = gen.server_ipv6;
desktop_ipv6 = gen.desktop_ipv6;
in {
inherit hosts;
inherit interfaces;
inherit wireguard;
inherit server_ipv4;
inherit server_ipv6;
inherit desktop_ipv6;
domain = "lan.servnerr.com";
localhost = {
ipv4 = "127.0.0.1";
ipv6 = "::1";
};
}