summaryrefslogtreecommitdiff
path: root/hosts/saklas
diff options
context:
space:
mode:
authorvin <vin@vineetk.net>2025-03-02 20:46:44 -0500
committervin <vin@vineetk.net>2025-03-02 20:46:44 -0500
commitdd93de927f47cf894afb9c969954eb5fceb1fac7 (patch)
tree1e2b185329ea4f1156db12e7d3de031cb4f5d18e /hosts/saklas
parentdc694bf08c5acb31e4ab03fc81d9ebd2d7420739 (diff)
saklas: wireguard and stuff
Diffstat (limited to 'hosts/saklas')
-rw-r--r--hosts/saklas/default.nix58
1 files changed, 53 insertions, 5 deletions
diff --git a/hosts/saklas/default.nix b/hosts/saklas/default.nix
index 170e1be..faeb1b6 100644
--- a/hosts/saklas/default.nix
+++ b/hosts/saklas/default.nix
@@ -9,12 +9,60 @@
9 networking = { 9 networking = {
10 hostName = "saklas"; 10 hostName = "saklas";
11 hostId = "b0bababe"; 11 hostId = "b0bababe";
12 useDHCP = false;
12 13
13 wireless.enable = false; 14 wireless.enable = false;
14 15
15 firewall = { 16 firewall = {
16 allowedTCPPorts = [ 22 80 443 ]; 17 allowedTCPPorts = [ 22 80 443 ];
17 allowedUDPPorts = [ 51413 ]; 18 allowedUDPPorts = [ 3478 51820 ];
19 };
20
21 # VPN
22 wireguard.interfaces = {
23 # vpn to vps
24 wg0 = {
25 ips = [ "10.0.13.1/24" ];
26 listenPort = 51820;
27 privateKey = "***REMOVED***";
28
29 peers = [
30 {
31 # demiurge
32 allowedIPs = [ "10.0.13.2/32" ];
33 publicKey = "kdvqM1fph4eglG33vCELCVIMKNu4ln/rm6MwcymeNUw=";
34 presharedKey = "***REMOVED***";
35 }
36 {
37 # lappy
38 allowedIPs = [ "10.0.13.3/32" ];
39 publicKey = "fqxxnp7mJAr52oBDjSd+J1iu3/RUUg++XCXtUfnLWhs=";
40 presharedKey = "***REMOVED***";
41 }
42 {
43 # iphonebob
44 allowedIPs = [ "10.0.13.4/32" ];
45 publicKey = "lZ4C67LdkE/zcMKyt5l8fKffieOz2yC7WN3v0w0OCTI=";
46 presharedKey = "***REMOVED***";
47 }
48 ];
49 };
50 };
51 };
52
53 systemd.network = {
54 enable = true;
55 networks."10-wan" = {
56 matchConfig.Name = "enp1s0";
57 networkConfig.DHCP = "no";
58 address = [
59 "95.217.18.52/32"
60 "2a01:4f9:c010:a653::1/64"
61 ];
62 routes = [
63 { Destination = "172.31.1.1"; }
64 { Gateway = "172.31.1.1"; GatewayOnLink = true; }
65 ];
18 }; 66 };
19 }; 67 };
20 68
@@ -137,21 +185,21 @@
137 }; 185 };
138 }; 186 };
139 187
140 "vinbiz.ca" = { 188 "13f0.net" = {
141 enableACME = true; 189 enableACME = true;
142 forceSSL = true; 190 forceSSL = true;
143 locations."/" = { 191 locations."/" = {
144 index = "index.html"; 192 index = "index.html";
145 root = "/var/www/vinbiz_html"; 193 root = "/var/www/13f0_html";
146 }; 194 };
147 }; 195 };
148 196
149 "13f0.net" = { 197 "vinbiz.ca" = {
150 enableACME = true; 198 enableACME = true;
151 forceSSL = true; 199 forceSSL = true;
152 locations."/" = { 200 locations."/" = {
153 index = "index.html"; 201 index = "index.html";
154 root = "/var/www/13f0_html"; 202 root = "/var/www/vinbiz_html";
155 }; 203 };
156 }; 204 };
157 }; 205 };