TIL

Bite-sized tricks and findings.

BBR and larger TCP buffers for WireGuard tunnels

Default CUBIC congestion control undershoots throughput on WireGuard tunnels. Switching to BBR and increasing TCP buffer sizes made a noticeable difference for torrent racing:

boot.kernel.sysctl = {
  "net.core.default_qdisc" = "fq";
  "net.ipv4.tcp_congestion_control" = "bbr";
  "net.core.rmem_max" = 16777216;
  "net.core.wmem_max" = 16777216;
  "net.ipv4.tcp_rmem" = "4096 87380 16777216";
  "net.ipv4.tcp_wmem" = "4096 65536 16777216";
};

BBR needs fq as the qdisc to work properly.

Booting into Rescue Mode with a Locked Root Account

If your root account is locked (common on NixOS), systemd’s rescue mode normally refuses to start. Add systemd.setenv=SYSTEMD_SULOGIN_FORCE=1 to the kernel command line and it will drop you into a shell regardless.

Great Hugo Reference Template

Hugo’s documentation can be tricky to parse, so I look for good examples. While figuring out how to integrate a CSS/JS framework with Hugo, I found hugo-theme-bootstrap. The sheer number of configuration options and features makes it a great reference for learning Hugo patterns.