Refactor Wireguard to make it use sisko
as server
This commit is contained in:
parent
0d3c1aae46
commit
f05c12545a
29 changed files with 430 additions and 418 deletions
21
modules/wireguard-common/default.nix
Normal file
21
modules/wireguard-common/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{config, ...}: {
|
||||
networking.firewall.interfaces.wg0 = {
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
from = 0;
|
||||
to = 65535;
|
||||
}
|
||||
];
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
from = 0;
|
||||
to = 65535;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
networking.wireguard.interfaces.wg0 = {
|
||||
privateKeyFile = config.age.secrets."${config.networking.hostName}-wireguard-private-key".path;
|
||||
listenPort = 51820;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue