wireguard vps

This commit is contained in:
Danilo Reyes 2025-09-07 18:40:14 -06:00
parent 825d8fe72d
commit 16e556f113
2 changed files with 15 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ ... }:
{ config, ... }:
{
imports = [
./hardware-configuration.nix
@ -6,6 +6,7 @@
../../config/stylix.nix
];
my = import ./toggles.nix;
sops.secrets."vps/home/private".sopsFile = ../../secrets/wireguard.yaml;
networking =
let
ports = [
@ -20,6 +21,18 @@
allowedTCPPorts = ports;
allowedUDPPorts = ports;
};
wireguard.interfaces.wg0 = {
ips = [ "10.77.0.2/32" ];
privateKeyFile = config.sops.secrets."vps/home/private".path;
peers = [
{
publicKey = "dFbiSekBwnZomarcS31o5+w6imHjMPNCipkfc2fZ3GY=";
endpoint = "51.222.141.104:51820";
allowedIPs = [ "10.77.0.1/32" ];
persistentKeepalive = 25;
}
];
};
};
nix =
let

View File

@ -26,7 +26,7 @@ in
services = enableList mkEnabled [
"network"
"nvidia"
"wireguard"
# "wireguard"
];
dev = enableList mkEnabled [
"nix"