add new ip route setting

This commit is contained in:
Florian Agbuya 2024-02-15 10:14:40 +08:00
parent 38638fa5fe
commit 3d5299f8c6
1 changed files with 4 additions and 3 deletions

View File

@ -29,7 +29,7 @@ index 010c487..37f6aaa 100644
mode = "0444"; mode = "0444";
}; };
diff --git a/runit.nix b/runit.nix diff --git a/runit.nix b/runit.nix
index d7b0bf3..67cff43 100644 index d7b0bf3..3c9ea3f 100644
--- a/runit.nix --- a/runit.nix
+++ b/runit.nix +++ b/runit.nix
@@ -7,8 +7,8 @@ let @@ -7,8 +7,8 @@ let
@ -43,7 +43,7 @@ index d7b0bf3..67cff43 100644
AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u
''; '';
compat = pkgs.runCommand "runit-compat" {} '' compat = pkgs.runCommand "runit-compat" {} ''
@@ -31,10 +31,10 @@ in @@ -31,10 +31,11 @@ in
"runit/1".source = pkgs.writeScript "1" '' "runit/1".source = pkgs.writeScript "1" ''
#!${pkgs.runtimeShell} #!${pkgs.runtimeShell}
${lib.optionalString config.not-os.simpleStaticIp '' ${lib.optionalString config.not-os.simpleStaticIp ''
@ -53,7 +53,8 @@ index d7b0bf3..67cff43 100644
- ip route add 10.0.2.0/24 dev eth0 - ip route add 10.0.2.0/24 dev eth0
- ip route add default via 10.0.2.2 dev eth0 - ip route add default via 10.0.2.2 dev eth0
+ ip route add 103.206.98.200/29 dev eth0 + ip route add 103.206.98.200/29 dev eth0
+ ip route add default via 103.206.98.200 dev eth0 + ip route del default
+ ip route add 0.0.0.0/0 via 103.206.98.200 advmss 1340
''} ''}
mkdir /bin/ mkdir /bin/
ln -s ${pkgs.runtimeShell} /bin/sh ln -s ${pkgs.runtimeShell} /bin/sh