feat(wireguard): add WireGuard VPN role
Replace inline wg-quick config in nix-book with a reusable role that uses inline config instead of configFile, fixing the world-readable /tmp key leak. Adds network-online.target dependency to prevent boot failures from DNS not being ready. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -42,6 +42,20 @@
|
||||
enable = true;
|
||||
waydroid = true;
|
||||
};
|
||||
wireguard = {
|
||||
enable = true;
|
||||
autostart = true;
|
||||
interfaceName = "ogleNet";
|
||||
address = [ "192.168.4.2/32" ];
|
||||
privateKeyFile = "/etc/wireguard/oglehome-private-key";
|
||||
dns = [ "192.168.4.1" ];
|
||||
peers = [{
|
||||
publicKey = "AWkmtaz0poyyKJGnRcabO5ecd6ESh1lKu+XRb3ObxBc=";
|
||||
endpoint = "pi.johnogle.info:6666";
|
||||
allowedIPs = [ "0.0.0.0/0" ];
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
@@ -61,13 +75,6 @@
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# WireGuard setup
|
||||
networking.wg-quick.interfaces = {
|
||||
ogleNet = {
|
||||
configFile = "/root/Oglehome-VPN-johno-nixbook.conf";
|
||||
};
|
||||
};
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
|
||||
Reference in New Issue
Block a user