Skip to content

Commit

Permalink
nixos/lock-kernel-modules: fix deferred fileSystem mounts
Browse files Browse the repository at this point in the history
Ensure that modules required by all declared fileSystems are explicitly
loaded.  A little ugly but fixes the deferred mount test.

See also #29019
  • Loading branch information
joachifm committed Sep 22, 2017
1 parent bccaf63 commit 1df6cf5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nixos/modules/security/lock-kernel-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ with lib;
};

config = mkIf config.security.lockKernelModules {
boot.kernelModules = concatMap (x:
if x.device != null
then
if x.fsType == "vfat"
then [ "vfat" "nls-cp437" "nls-iso8859-1" ]
else [ x.fsType ]
else []) config.system.build.fileSystems;

systemd.services.disable-kernel-module-loading = rec {
description = "Disable kernel module loading";

Expand Down

0 comments on commit 1df6cf5

Please sign in to comment.