You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.1 KiB
Nix

1 year ago
{
version = "v1";
subnets = [
{
name = "simple";
endpoints = [
{
# No match mean match any
port = 51820;
}
];
}
];
groups = [
# groups field is expected, but can be empty
];
peers = [
{
1 year ago
name = "node1";
1 year ago
subnets = {
simple = {
listenPort = 51820;
# empty ipAddresses will auto generate an IPv6 address
};
};
publicKey = "kdyzqV8cBQtDYeW6R1vUug0Oe+KaytHHDS7JoCp/kTE=";
privateKeyFile = "/etc/wg-key";
1 year ago
endpoints = [
{
# no match can be any
1 year ago
ip = "node1";
1 year ago
}
];
}
{
1 year ago
name = "node2";
1 year ago
subnets = {
simple = {
listenPort = 51820;
};
};
publicKey = "ztdAXTspQEZUNpxUbUdAhhRWbiL3YYWKSK0ZGdcsMHE=";
privateKeyFile = "/etc/wg-key";
1 year ago
endpoints = [
{
# no match can be any
1 year ago
ip = "node2";
1 year ago
}
];
}
];
connections = [
{
a = [{type= "subnet"; rule = "is"; value = "simple";}];
b = [{type= "subnet"; rule = "is"; value = "simple";}];
}
];
}