summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2024-01-30 14:50:47 -0500
committerKjetil Orbekk <kj@orbekk.com>2024-01-30 14:50:47 -0500
commite81024033506b38297351c393b82e0bf2afdb67e (patch)
tree7a301fd0afbeaa91a97dc2494817a6b99b9afdb9
parent4a67e5c218c055ad554f6745e3546eddae9ec488 (diff)
router /proc/sys workaround
-rw-r--r--modules/router.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/router.nix b/modules/router.nix
index bc4a83f..e5d95c3 100644
--- a/modules/router.nix
+++ b/modules/router.nix
@@ -106,6 +106,22 @@ let
}];
systemd.services.he0-netdev.after = ["kjlan-netdev.service"];
+ systemd.timers.fix-proc-sys = {
+ wantedBy = ["multi-user.target"];
+ timerConfig = {
+ Persistent = true;
+ OnBootSec = "1m";
+ OnUnitActiveSec = "15m";
+ };
+ };
+ systemd.services.fix-proc-sys = {
+ description = "Remount /proc/sys as rw";
+ wantedBy = ["multi-user.target"];
+ script = ''
+ mount -o remount,rw /proc/sys
+ '';
+ };
+
networking.iproute2.enable = true;
networking.iproute2.rttablesExtraConfig = ''
${toString vpnMark} vpn