From 85b74e3328f159c0d7db04817c9fd0014293e8bd Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Sat, 13 Sep 2025 11:39:01 +0200 Subject: [PATCH] Add thinkpad to wireguard subnet --- hosts/nixos/thinkpad/system.nix | 14 ++++++++++++++ hosts/nixos/vps/system.nix | 5 +++++ modules/plasma.nix | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/hosts/nixos/thinkpad/system.nix b/hosts/nixos/thinkpad/system.nix index 2719494..fa9a7fd 100644 --- a/hosts/nixos/thinkpad/system.nix +++ b/hosts/nixos/thinkpad/system.nix @@ -1,6 +1,7 @@ { config, pkgs, lib, ... }: { imports = [ ./hardware-configuration.nix + ../../../modules/wireguard.nix ]; # Bootloader - standard UEFI setup @@ -319,6 +320,19 @@ # Apply XKB config to console (TTY) as well console.useXkbConfig = true; + # WireGuard VPN configuration (ThinkPad as client/spoke) + services.wireguard-custom = { + enable = true; + mode = "client"; + privateKeyFile = "/etc/wireguard/thinkpad_private.key"; + clientConfig = { + address = "10.2.2.30/24"; + serverPublicKey = "46QHjSzAas5g9Hll1SCEu9tbR5owCxXAy6wGOUoPwUM="; + serverEndpoint = "91.98.84.215:51820"; + allowedIPs = [ "10.2.2.0/24" ]; + }; + }; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. diff --git a/hosts/nixos/vps/system.nix b/hosts/nixos/vps/system.nix index 96a8703..06d73fe 100644 --- a/hosts/nixos/vps/system.nix +++ b/hosts/nixos/vps/system.nix @@ -147,6 +147,11 @@ publicKey = "HZY7V8QlnFvY6ZWNiI0WgUgWUISnEqUdzXi7Oq9M1Es="; allowedIPs = [ "10.2.2.20/32" ]; } + { + name = "thinkpad"; + publicKey = "p3442J2HBGY5Pksu+0F4SFkBGjG99KIgwyk8eAt4YmA="; + allowedIPs = [ "10.2.2.30/32" ]; + } ]; }; }; diff --git a/modules/plasma.nix b/modules/plasma.nix index 332241d..f1b8003 100644 --- a/modules/plasma.nix +++ b/modules/plasma.nix @@ -15,7 +15,7 @@ profiles.Main = { font = { name = "JetBrainsMono Nerd Font"; - size = 14; + size = 13; }; colorScheme = "Breeze"; extraConfig = {