mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add wireguard
This commit is contained in:
parent
f92782f3d8
commit
dffc51471b
3 changed files with 17 additions and 17 deletions
|
|
@ -32,7 +32,7 @@ in {
|
|||
mods.server.sync.enable = false;
|
||||
mods.tailscale.enable = true;
|
||||
mods.openvpn.enable = false;
|
||||
mods.wireguard.enable = false;
|
||||
mods.wireguard.enable = true;
|
||||
|
||||
services.xserver.windowManager.i3.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,29 +20,28 @@
|
|||
services.tailscale.enable = config.mods.tailscale.enable;
|
||||
|
||||
services.openvpn.servers = lib.mkIf config.mods.openvpn.enable {
|
||||
remote.config = ''config ${config.mods.openvpn.config}'';
|
||||
remote.config = "config ${config.mods.openvpn.config}";
|
||||
};
|
||||
|
||||
networking.firewall = lib.mkIf config.mods.wireguard.enable {
|
||||
allowedUDPPorts = [ 51820 ]; # Clients and peers can use the same port, see listenport
|
||||
allowedUDPPorts =
|
||||
[ 51820 ]; # Clients and peers can use the same port, see listenport
|
||||
};
|
||||
networking.wg-quick.interfaces = lib.mkIf config.mods.wireguard.enable {
|
||||
wg0 = {
|
||||
address = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64" ];
|
||||
address = [ "10.0.0.3/24" "fdc9:281f:04d7:9ee9::3/64" ];
|
||||
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
|
||||
mtu = 1500;
|
||||
privateKeyFile = "/home/muon/wireguard-keys/private";
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = "2RF8GmTZwQdzVm2l2piYy6U0qiMU3wSxC7Lt8urAjwA=";
|
||||
presharedKeyFile = "/home/muon/wireguard-keys/psk-muon";
|
||||
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
||||
# ip route add 93.95.230.11 via 192.168.0.1
|
||||
endpoint = "93.95.230.11:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
peers = [{
|
||||
publicKey = "2RF8GmTZwQdzVm2l2piYy6U0qiMU3wSxC7Lt8urAjwA=";
|
||||
presharedKeyFile = "/home/muon/wireguard-keys/psk-muho";
|
||||
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
||||
# ip route add 93.95.230.11 via 192.168.0.1
|
||||
endpoint = "93.95.230.11:51820";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -10,12 +10,13 @@
|
|||
services.jellyfin = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
# user = "${config.mods.user.name}";
|
||||
user = "${config.mods.user.name}";
|
||||
};
|
||||
|
||||
services.immich = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
host = "0.0.0.0";
|
||||
# user = "${config.mods.user.name}";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue