summaryrefslogtreecommitdiff
path: root/config/vpn-server.nix
diff options
context:
space:
mode:
Diffstat (limited to 'config/vpn-server.nix')
-rw-r--r--config/vpn-server.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/vpn-server.nix b/config/vpn-server.nix
new file mode 100644
index 0000000..f2663d5
--- /dev/null
+++ b/config/vpn-server.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs, ... }:
+let
+ port = (import ../data/aliases.nix).services.wireguard.port;
+in
+{
+ networking.wireguard = {
+ interfaces = {
+ wg0 = {
+ ips = [ "10.35.190.1/23" ];
+ privateKeyFile = "/opt/secret/wireguard/wg0.key";
+ listenPort = port;
+ peers = [
+ {
+ publicKey = "ULWhaOsAaTu4cu84v3PM4DL7arxc/WNnzI/ic2k1KBU=";
+ allowedIPs = ["0.0.0.0/0" "::/0"];
+ }
+ ];
+ };
+ };
+ };
+}