nix-config/hosts/server7/containers/outer-defaults.nix

19 lines
523 B
Nix

name:
let yggaddr = import ../yggaddr.nix;
in {
# These the container defaults from the perspective of the host.
autoStart = true;
privateNetwork = true;
hostBridge = "br0";
localAddress6 = with builtins; let
hash = hashString "sha256" name;
hextet0 = substring 0 4 hash;
hextet1 = substring 4 4 hash;
in "${yggaddr.prefix}:${hextet0}:${hextet1}:c3d2/64";
# Generate a deterministic IPv6 address for the container.
# This address is accessible within HQ and Yggdrasil but not from ARPANET.
}