remove wireguard

This commit is contained in:
Joakim Repomaa
2024-08-06 22:37:41 +03:00
parent 08d97b1c07
commit 4c4597af0e
2 changed files with 0 additions and 42 deletions

View File

@@ -36,7 +36,6 @@
./gtrackmap.nix
./owncast.nix
./hydra.nix
./wireguard.nix
./tailscale.nix
];
}

View File

@@ -1,41 +0,0 @@
{ config, pkgs, lib, ... }:
let
port = 51820;
name = "wg0";
peers = [
{
PublicKey = "XI0/k2j20CVSfevwjkmo4IddVoA2VY2fN6feauXYEXU=";
AllowedIPs = [ "10.100.0.2" ];
} # radish
];
address = [ "10.100.0.1/24" ];
in
{
networking.firewall.allowedUDPPorts = [ port ];
networking.useNetworkd = true;
systemd.network = {
enable = true;
netdevs.${name} = {
netdevConfig = {
Kind = "wireguard";
Name = "${name}";
MTUBytes = "1300";
};
wireguardConfig = {
PrivateKeyFile = "/var/secrets/wireguard-privkey";
ListenPort = port;
};
wireguardPeers = peers;
};
networks.${name} = {
matchConfig.Name = name;
inherit address;
networkConfig = {
IPMasquerade = "ipv4";
IPForward = true;
};
};
};
}