birdsong: begin modularising wireguard config
This commit is contained in:
parent
5f70f26e98
commit
5d258de497
4 changed files with 75 additions and 16 deletions
|
@ -3,21 +3,13 @@
|
|||
{
|
||||
age.secrets.wireguard-peer-tohru.file = ../../secrets/wireguard-peer-tohru.age;
|
||||
|
||||
networking = {
|
||||
firewall.allowedUDPPorts = [ config.networking.wireguard.interfaces.wg0.listenPort ];
|
||||
|
||||
wireguard.interfaces.wg0 = {
|
||||
ips = [ "10.127.1.3/24" "fd70:81ca:0f8f:1::3/64" ];
|
||||
listenPort = 51821;
|
||||
privateKeyFile = config.age.secrets.wireguard-peer-tohru.path;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "birdLVh8roeZpcVo308Ums4l/aibhAxbi7MBsglkJyA=";
|
||||
allowedIPs = [ "10.127.1.0/24" "fd70:81ca:0f8f:1::/64" ];
|
||||
endpoint = "birdsong.network:51820";
|
||||
persistentKeepalive = 23;
|
||||
}
|
||||
];
|
||||
};
|
||||
birdsong.peer = {
|
||||
enable = true;
|
||||
privateKeyFile = config.age.secrets.wireguard-peer-tohru.path;
|
||||
listenPort = 51821;
|
||||
persistentKeepalive = 23;
|
||||
};
|
||||
|
||||
# TODO: get this from a list of peers, keyed on hostname
|
||||
networking.wireguard.interfaces.birdsong.ips = [ "10.127.1.3/24" "fd70:81ca:0f8f:1::3/64" ];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue