summaryrefslogtreecommitdiff
path: root/hosts/vidhar/network
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/vidhar/network')
-rw-r--r--hosts/vidhar/network/bifrost/default.nix46
-rw-r--r--hosts/vidhar/network/default.nix31
2 files changed, 32 insertions, 45 deletions
diff --git a/hosts/vidhar/network/bifrost/default.nix b/hosts/vidhar/network/bifrost/default.nix
index ec354f81..59550481 100644
--- a/hosts/vidhar/network/bifrost/default.nix
+++ b/hosts/vidhar/network/bifrost/default.nix
@@ -18,12 +18,10 @@ in {
18 ListenPort = 51822; 18 ListenPort = 51822;
19 }; 19 };
20 wireguardPeers = [ 20 wireguardPeers = [
21 { wireguardPeerConfig = { 21 { AllowedIPs = [ "::/0" ];
22 AllowedIPs = [ "::/0" ]; 22 PublicKey = trim (readFile ../../../surtr/bifrost/surtr.pub);
23 PublicKey = trim (readFile ../../../surtr/bifrost/surtr.pub); 23 PersistentKeepalive = 5;
24 PersistentKeepalive = 5; 24 Endpoint = "2a03:4000:52:ada:::51822";
25 Endpoint = "2a03:4000:52:ada:::51822";
26 };
27 } 25 }
28 ]; 26 ];
29 }; 27 };
@@ -36,35 +34,25 @@ in {
36 }; 34 };
37 address = ["2a03:4000:52:ada:4:1::/96"]; 35 address = ["2a03:4000:52:ada:4:1::/96"];
38 routes = [ 36 routes = [
39 { routeConfig = { 37 { Destination = "2a03:4000:52:ada:4::/80";
40 Destination = "2a03:4000:52:ada:4::/80";
41 };
42 } 38 }
43 { routeConfig = { 39 { Gateway = "2a03:4000:52:ada:4::";
44 Gateway = "2a03:4000:52:ada:4::"; 40 GatewayOnLink = true;
45 GatewayOnLink = true; 41 Table = "bifrost";
46 Table = "bifrost";
47 };
48 } 42 }
49 { routeConfig = { 43 { Destination = "2a03:4000:52:ada:4::/80";
50 Destination = "2a03:4000:52:ada:4::/80"; 44 GatewayOnLink = true;
51 GatewayOnLink = true; 45 Table = "bifrost";
52 Table = "bifrost";
53 };
54 } 46 }
55 { routeConfig = { 47 { Destination = "2a03:4000:52:ada:4:1::/96";
56 Destination = "2a03:4000:52:ada:4:1::/96"; 48 GatewayOnLink = true;
57 GatewayOnLink = true; 49 Table = "bifrost";
58 Table = "bifrost";
59 };
60 } 50 }
61 ]; 51 ];
62 routingPolicyRules = [ 52 routingPolicyRules = [
63 { routingPolicyRuleConfig = { 53 { Table = "bifrost";
64 Table = "bifrost"; 54 From = "2a03:4000:52:ada:4:1::/96";
65 From = "2a03:4000:52:ada:4:1::/96"; 55 Priority = 1;
66 Priority = 1;
67 };
68 } 56 }
69 ]; 57 ];
70 linkConfig = { 58 linkConfig = {
diff --git a/hosts/vidhar/network/default.nix b/hosts/vidhar/network/default.nix
index e961c17e..4a792851 100644
--- a/hosts/vidhar/network/default.nix
+++ b/hosts/vidhar/network/default.nix
@@ -89,22 +89,21 @@ with lib;
89 }; 89 };
90 }; 90 };
91 91
92 services.nfs.server = { 92 services.nfs = {
93 enable = true; 93 server = {
94 createMountPoints = true; 94 enable = true;
95 95 createMountPoints = true;
96 statdPort = 4000; 96
97 lockdPort = 4001; 97 statdPort = 4000;
98 mountdPort = 4002; 98 lockdPort = 4001;
99 99 mountdPort = 4002;
100 extraNfsdConfig = '' 100
101 vers3=off 101 exports = ''
102 ''; 102 /srv/nfs 10.141.0.0/24(ro,async,root_squash,fsid=0) 2a03:4000:52:ada:1::/80(ro,async,root_squash,fsid=0)
103 103 /srv/nfs/nix-store 10.141.0.0/24(ro,async,root_squash) 2a03:4000:52:ada:1::/80(ro,async,root_squash)
104 exports = '' 104 '';
105 /srv/nfs 10.141.0.0/24(ro,async,root_squash,fsid=0) 2a03:4000:52:ada:1::/80(ro,async,root_squash,fsid=0) 105 };
106 /srv/nfs/nix-store 10.141.0.0/24(ro,async,root_squash) 2a03:4000:52:ada:1::/80(ro,async,root_squash) 106 settings.nfsd.vers3 = false;
107 '';
108 }; 107 };
109 108
110 fileSystems = { 109 fileSystems = {