added vpn

This commit is contained in:
biscuit
2025-05-20 11:28:28 -05:00
parent d0532495e0
commit 6044c4e063
4 changed files with 26 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
{...}: {
imports = [
../system/vpn.nix
];
}
+1
View File
@@ -9,6 +9,7 @@
./hardware-configuration.nix
../../modules/system.nix
../../modules/xserver.nix
../../modules/misc.nix
];
environment.systemPackages = with pkgs; [
+2 -2
View File
@@ -1,6 +1,6 @@
{ ... }: {
{pkgs, ...}: {
networking.hostName = "nixos";
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
}
+18
View File
@@ -0,0 +1,18 @@
{...}: {
networking.wireguard.interfaces = {
biscuit-default = {
ips = ["10.2.0.2/32"];
listenPort = 51820;
privateKeyFile = "/home/biscuit/Wireguard/secret";
dns = ["10.2.0.1"];
peers = [
{
publicKey = "KkUoHrIzkuQ4msZulqCFyRC1Gqcx8oMgbDFRn8wW1X8=";
allowedIPs = ["0.0.0.0/0"];
endpoint = "95.173.221.65:51820";
persistentKeepAlive = 25;
}
];
};
};
}