Nuke the fuck out of Wireguard slow as balls
This commit is contained in:
parent
491183aa7d
commit
7a56104845
36 changed files with 57 additions and 340 deletions
Binary file not shown.
|
@ -12,6 +12,5 @@
|
|||
./sunshine
|
||||
./tlp
|
||||
./userborn
|
||||
./wireguard
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
options.services.wg.client.enable = lib.mkEnableOption "Enable Wireguard client";
|
||||
|
||||
config = lib.mkIf config.services.wg.client.enable {
|
||||
boot.kernelModules = [ "wireguard" ];
|
||||
|
||||
systemd.network = {
|
||||
netdevs = {
|
||||
"10-wg0" = {
|
||||
netdevConfig = {
|
||||
Kind = "wireguard";
|
||||
Name = "wg0";
|
||||
MTUBytes = "1300";
|
||||
};
|
||||
wireguardConfig = {
|
||||
PrivateKeyFile = pkgs.writeText "wgclientsecret" config.secrets.wg.clientKey;
|
||||
ListenPort = 9918;
|
||||
};
|
||||
};
|
||||
};
|
||||
networks."wg0" = {
|
||||
matchConfig.Name = "wg0";
|
||||
DHCP = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -18,6 +18,5 @@
|
|||
./transmission
|
||||
./trilium
|
||||
./vaultwarden
|
||||
./wireguard
|
||||
];
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# Passwords made with 'mkpasswd -sm bcrypt'
|
||||
loginAccounts = {
|
||||
"jimbo@nixfox.ca" = {
|
||||
hashedPassword = config.secrets.mailHash.jimbo;
|
||||
hashedPassword = config.secrets.mailHash.bun;
|
||||
aliases = [
|
||||
"james@nixfox.ca"
|
||||
"jimbo@bloxelcom.net"
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
options.services.wg.server.enable = lib.mkEnableOption "Enable Wireguard server";
|
||||
|
||||
config = lib.mkIf config.services.wg.server.enable {
|
||||
systemd.network = {
|
||||
netdevs = {
|
||||
"50-wg0" = {
|
||||
netdevConfig = {
|
||||
Kind = "wireguard";
|
||||
Name = "wg0";
|
||||
MTUBytes = "1300";
|
||||
};
|
||||
wireguardConfig = {
|
||||
PrivateKeyFile = pkgs.writeText "wgserversecret" config.secrets.wg.serverKey;
|
||||
ListenPort = 51820;
|
||||
RouteTable = "main";
|
||||
};
|
||||
wireguardPeers = [
|
||||
{ # NixOS Config Key
|
||||
PublicKey = "OKUH/h6YSURI4vgeTZKQD15QsqaygdbTn1mAWzQp9S0=";
|
||||
AllowedIPs = [ "11.0.0.0/8" ];
|
||||
}
|
||||
{ # Pixel 9
|
||||
PublicKey = "dPCtjm67adMZCnyL1O2L+uUOk0RbjA9T/tht1r+qcE4=";
|
||||
AllowedIPs = [ "11.1.0.1/32" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
networks."wg0" = {
|
||||
matchConfig.Name = "wg0";
|
||||
address = [ "11.0.0.1/8" ];
|
||||
networkConfig = {
|
||||
IPMasquerade = "both";
|
||||
IPv4Forwarding = true;
|
||||
IPv6Forwarding = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue