setup wireguard peers
This commit is contained in:
parent
21fb2ec1e4
commit
73090f76d4
1 changed files with 9 additions and 6 deletions
|
@ -1,14 +1,17 @@
|
||||||
_: {
|
{secrets, ...}: {
|
||||||
networking.wireguard = {
|
networking.wireguard = let
|
||||||
|
inherit (secrets.wireguard_config) server;
|
||||||
|
inherit (secrets.wireguard_config) peers;
|
||||||
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
interfaces = {
|
interfaces = {
|
||||||
wg0 = {
|
wg0 = {
|
||||||
ips = [
|
inherit (peers."1") ips;
|
||||||
"10.8.1.2/24"
|
|
||||||
"fdd9:69ae:9703::2/64"
|
|
||||||
];
|
|
||||||
privateKeyFile = "/etc/wireguard/private.key";
|
privateKeyFile = "/etc/wireguard/private.key";
|
||||||
generatePrivateKeyFile = true;
|
generatePrivateKeyFile = true;
|
||||||
|
peers = [
|
||||||
|
server
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue