diff options
| author | Franck Cuny <franck@fcuny.net> | 2023-03-18 11:58:35 -0700 |
|---|---|---|
| committer | Franck Cuny <franck@fcuny.net> | 2023-04-03 17:53:02 -0700 |
| commit | c5a78751f96587bf4a3704143ac81598ee6c3e5b (patch) | |
| tree | daf41e9b05ade02118eaa08aabf9bac771e12c71 /hosts/carmel/boot.nix | |
| parent | flake: fix URL for sendsms (diff) | |
| download | infra-c5a78751f96587bf4a3704143ac81598ee6c3e5b.tar.gz | |
hosts/carmel: reconfigure the host as a router
I'm not using it as a desktop, and the current router is getting old and
will likely fail in the near future. It's also a debian machine
configured manually, so let's reconfigure carmel as our new router.
There are three NICs in the host: 2 are 10Gb and one is 1Gb. The 1Gb
will be used as the upstream interface, and one of the 10Gb will be for
the LAN.
There are 2 VLANs to configure: one for IoT devices and one for guest.
Diffstat (limited to '')
| -rw-r--r-- | hosts/carmel/boot.nix | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/hosts/carmel/boot.nix b/hosts/carmel/boot.nix index 606215e..5beb31b 100644 --- a/hosts/carmel/boot.nix +++ b/hosts/carmel/boot.nix @@ -2,13 +2,21 @@ { boot = { - # get an IP address on boot, so we can unlock the root disk remotely - kernelParams = [ "ip=dhcp" ]; - initrd = { - # driver for the NIC, required in order to get an IP address - kernelModules = [ "igb" ]; + loader = { + systemd-boot = { + enable = true; + # see https://www.man7.org/linux/man-pages/man5/loader.conf.5.html + consoleMode = "max"; + }; + efi.canTouchEfiVariables = true; + efi.efiSysMountPoint = "/boot/efi"; }; - }; - my.system.boot = { initrd = { network.enable = true; }; }; + kernel.sysctl = { + "net.ipv4.conf.all.forwarding" = true; + "net.ipv4.conf.default.forwarding" = true; + "net.core.default_qdisc" = "fq"; + "net.ipv4.tcp_congestion_control" = "bbr"; + }; + }; } |
