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 d7121b4df9 nixos/lib/vargen: WIP WireGuard support
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-05-29 17:02:21 -04:00

22 lines
518 B
Nix

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