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
Matt Layher e57c3c99ea
nixos/lib/vargen: Go program to generate vars.nix data
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-04-28 14:08:59 -04:00

22 lines
558 B
Nix

# Variables referenced two or more places in the configuration.
let
# TODO: remove and pull from generated data.
server_ipv4 = "192.168.1.4";
server_ipv6 = "2600:6c4a:7880:3200:1e1b:dff:feea:830f";
# Import computed host/interface data from vars.json.
gen = builtins.fromJSON(builtins.readFile ./vars.json);
hosts = gen.hosts;
interfaces = gen.interfaces;
in {
inherit server_ipv4;
inherit server_ipv6;
inherit hosts;
inherit interfaces;
domain = "lan.servnerr.com";
localhost = {
ipv4 = "127.0.0.1";
ipv6 = "::1";
};
}