Skip to content

Commit

Permalink
base: enhance module disable
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Mar 24, 2024
1 parent 4568355 commit f28c16d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions modules/defaults/base/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ let
"thunderbolt"
"usb-midi"
];

all = net ++ fs ++ misc;
in
{
environment.etc."modprobe.d/disablemod.conf".text = concatStringsSep "\n"
(map (module: "install ${module} ${pkgs.coreutils}/bin/true")
(net ++ fs ++ misc)
);
(map (module: "install ${module} ${pkgs.coreutils}/bin/true") all
);

boot.blacklistedKernelModules = all;
}
2 changes: 1 addition & 1 deletion tests/default-os.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs: mod: { pkgs, lib, ... }:

testScript = ''
start_all()
server.execute("true")
server.wait_for_unit("ethtool-setringmax")
server.fail("lsmod | grep sctp")
'';
}

0 comments on commit f28c16d

Please sign in to comment.