From b5be218f142650439ffd3cedc07c3062f4dc8c91 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Wed, 18 Nov 2026 22:11:42 +0000 Subject: [PATCH] nixos/common: Block SCTP kernel module loading --- nixos/modules/common.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nixos/modules/common.nix b/nixos/modules/common.nix index eacf890..f4c845b 100644 --- a/nixos/modules/common.nix +++ b/nixos/modules/common.nix @@ -129,6 +129,13 @@ in boot = { # Use latest LTS release by default kernelPackages = mkDefault (lib.my.c.kernel.lts pkgs); + + # Containers share the host kernel. Block SCTP on the system that owns it. + extraModprobeConfig = mkIf (!config.boot.isContainer) '' + install sctp ${pkgs.coreutils}/bin/false + ''; + kernelParams = mkIf (!config.boot.isContainer) [ "module_blacklist=sctp" ]; + kernel = { sysctl = { "net.ipv6.route.max_size" = mkDefault 16384;