added wireguard to desktop
This commit is contained in:
@ -1 +1 @@
|
||||
configs/secrets.nix:a83d724b6fe99623ff5a9e649a30227c3c199d302b10dce75db8ab3f3271d7f8
|
||||
configs/secrets.nix:165513a6eda74a9bca732e62cb1ba1863bcd230be4e9cf0809b7081fe6f29133
|
||||
|
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
secrets = import ../configs/secrets.nix;
|
||||
in
|
||||
{
|
||||
imports =
|
||||
@ -36,6 +36,22 @@ in
|
||||
boot.kernelModules = [ "it87" "v4l2loopback" ];
|
||||
|
||||
networking.hostName = "desktop"; # Define your hostname.
|
||||
networking.wireguard.interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "10.100.0.2/24" ];
|
||||
privateKey = secrets.wireguard-desktop-private;
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = secrets.wireguard-vps-public;
|
||||
presharedKey = secrets.wireguard-preshared;
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
endpoint = "szczepan.ski:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
@ -24,6 +24,22 @@
|
||||
# allowedTCPPorts = [ 6443 ];
|
||||
};
|
||||
networkmanager.enable = true;
|
||||
wireguard.interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "10.100.0.3/24" ];
|
||||
privateKey = secrets.wireguard-mini-private;
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = secrets.wireguard-vps-public;
|
||||
presharedKey = secrets.wireguard-preshared;
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
endpoint = "szczepan.ski:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.k3s.enable = true;
|
||||
|
@ -38,6 +38,10 @@ in
|
||||
publicKey = secrets.wireguard-desktop-public;
|
||||
presharedKey = secrets.wireguard-preshared;
|
||||
allowedIPs = [ "10.100.0.2/32" ];
|
||||
}{
|
||||
publicKey = secrets.wireguard-mini-public;
|
||||
presharedKey = secrets.wireguard-preshared;
|
||||
allowedIPs = [ "10.100.0.3/32" ];
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user