Fix WG configuration

This commit is contained in:
Filippo Berto 2023-07-02 13:31:20 +01:00
parent 006406e9a6
commit e031606f96
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
10 changed files with 236 additions and 143 deletions

View file

@ -41,6 +41,26 @@ with lib; {
# firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# firewall.enable = false;
firewall.checkReversePath = false;
wg-quick.interfaces = {
wg0 = {
autostart = false;
address = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64" ];
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
privateKeyFile = config.age.secrets.odin_wg_priv.path;
peers = [
{
publicKey = "K57ikgFSR1O0CXWBxfQEu7uxSOsp3ePj/NMRets5pVc=";
presharedKeyFile = config.age.secrets.odin_wg_psk.path;
allowedIPs = [ "0.0.0.0/0" "::/0" ];
endpoint = "baldur.bertof.net:51820";
persistentKeepalive = 25;
}
];
};
};
};
services.hardware.bolt.enable = true;