Patrick Großmann
45fbf23758
fix: new rekey interface fix: nix-plugin build against newer nix version
44 lines
957 B
Nix
44 lines
957 B
Nix
{config, ...}: let
|
|
address = [
|
|
"10.0.0.2/32"
|
|
];
|
|
peer = {
|
|
endpoint = "lel.lol:51820";
|
|
publicKey = "t/jR2/0hxBXG0Ytah2w5RQ1gn94k0/Ku9LYcbRR7pXo=";
|
|
presharedKeyFile = config.age.secrets.wireguard-pre.path;
|
|
};
|
|
privateKeyFile = config.age.secrets.wireguard-priv.path;
|
|
in {
|
|
age.secrets = {
|
|
wireguard-pre.rekeyFile = ../../secrets/wireguard/elisabeth-pre.wg.age;
|
|
wireguard-priv.rekeyFile = ../../secrets/wireguard/elisabeth-priv.wg.age;
|
|
};
|
|
|
|
networking.wg-quick.interfaces = {
|
|
wg-intern = {
|
|
inherit address privateKeyFile;
|
|
peers = [
|
|
(peer
|
|
// {
|
|
allowedIPs = [
|
|
"10.0.0.1/32"
|
|
];
|
|
})
|
|
];
|
|
};
|
|
wg-all = {
|
|
inherit address privateKeyFile;
|
|
peers = [
|
|
(peer
|
|
// {
|
|
allowedIPs = [
|
|
"0.0.0.0/0"
|
|
"::/0"
|
|
];
|
|
})
|
|
];
|
|
autostart = false;
|
|
};
|
|
};
|
|
}
|