base/hardening: ban a bunch more unimportant kernel modules

This commit is contained in:
h7x4
2026-05-08 16:02:54 +09:00
parent 11d1f8b442
commit 86ca8dcdc3
2 changed files with 62 additions and 0 deletions

View File

@@ -13,6 +13,7 @@
./mitigations.nix ./mitigations.nix
./flake-input-exporter.nix ./flake-input-exporter.nix
./hardening.nix
./networking.nix ./networking.nix
./nix.nix ./nix.nix
./programs.nix ./programs.nix

61
base/hardening.nix Normal file
View File

@@ -0,0 +1,61 @@
{ ... }:
{
boot.blacklistedKernelModules = [
# Obscure network protocols
"appletalk"
"atm"
"ax25"
"batman-adv"
"can"
"netrom"
"psnap"
"rds"
"rose"
"sctp"
"tipc"
# Filesystems we don't use
"adfs"
"affs"
"befs"
"bfs"
"cifs"
"cramfs"
"efs"
"exofs"
"orangefs"
"freevxfs"
"gfs2"
"hfs"
"hfsplus"
"hpfs"
"jffs2"
"jfs"
"minix"
"nilfs2"
"ntfs"
"omfs"
"qnx4"
"qnx6"
"sysv"
"ubifs"
"ufs"
# Legacy hardware
"pcspkr"
"floppy"
"parport"
"ppdev"
# Other stuff we don't use
"firewire-core"
"firewire-ohci"
"ksmbd"
"ib_core"
"l2tp_eth"
"l2tp_netlink"
"l2tp_ppp"
"nfc"
"soundwire"
];
}