add service to enable packet forwarding

might be worth looking into adding RA config to this
This commit is contained in:
Daniel Barlow
2023-09-01 17:34:47 +01:00
parent ef666c34cd
commit 7ad848cb77
5 changed files with 40 additions and 27 deletions

View File

@@ -22,16 +22,7 @@ in rec {
dependencies = [ services.dhcpv4 ];
};
services.packet_forwarding =
let
iface = services.dhcpv4;
filename = "/proc/sys/net/ipv4/conf/$(output ${iface} ifname)/forwarding";
in oneshot {
name = "let-the-ip-flow";
up = "echo 1 > ${filename}";
down = "echo 0 > ${filename}";
dependencies = [iface];
};
services.packet_forwarding = svc.network.forward.build { };
services.ntp = config.system.service.ntp.build {
pools = { "pool.ntp.org" = ["iburst"] ; };