all: use wg-quick for wireguard
This commit is contained in:
parent
8318f75fcf
commit
b735c09e57
2 changed files with 4 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
_: {
|
||||
nodeconfig.wireguard = {
|
||||
interface-name = "Homelab";
|
||||
endpoint = "165.232.180.97:51821";
|
||||
endpoint-publickey = "NNw/iDMCTq8mpHncrecEh4UlvtINX/UUDtCJf2ToFR4=";
|
||||
allowed-ips = [
|
||||
|
|
|
@ -52,16 +52,15 @@ let cfg = config.nodeconfig; in {
|
|||
|
||||
config = lib.mkIf cfg.wireguard.enable {
|
||||
networking.firewall.trustedInterfaces = [ cfg.wireguard.interface-name ];
|
||||
networking.wireguard = {
|
||||
enable = true;
|
||||
networking.wg-quick = {
|
||||
interfaces = {
|
||||
"${cfg.wireguard.interface-name}" = {
|
||||
ips = cfg.wireguard.node-ips;
|
||||
address = cfg.wireguard.node-ips;
|
||||
dns = [ "10.10.10.10" ];
|
||||
listenPort = cfg.wireguard.listen-port;
|
||||
privateKeyFile = cfg.wireguard.pk-file;
|
||||
peers = [
|
||||
{
|
||||
name = "Default";
|
||||
endpoint = cfg.wireguard.endpoint;
|
||||
publicKey = cfg.wireguard.endpoint-publickey;
|
||||
presharedKeyFile = cfg.wireguard.psk-file;
|
||||
|
|
Loading…
Reference in a new issue