diff options
author | Joachim Fasting <joachifm@fastmail.fm> | 2017-09-22 23:45:04 +0200 |
---|---|---|
committer | Joachim Fasting <joachifm@fastmail.fm> | 2017-09-22 23:55:04 +0200 |
commit | 1df6cf5d1d6d4fa092252275ab82f409dd8f79fe (patch) | |
tree | d146d2397f20f3332aa426d697127e91f1e86795 | |
parent | bccaf630679a5251549fd11abb08eb35e6bcec8e (diff) | |
download | nixpkgs-1df6cf5d1d6d4fa092252275ab82f409dd8f79fe.tar nixpkgs-1df6cf5d1d6d4fa092252275ab82f409dd8f79fe.tar.gz nixpkgs-1df6cf5d1d6d4fa092252275ab82f409dd8f79fe.tar.bz2 nixpkgs-1df6cf5d1d6d4fa092252275ab82f409dd8f79fe.tar.lz nixpkgs-1df6cf5d1d6d4fa092252275ab82f409dd8f79fe.tar.xz nixpkgs-1df6cf5d1d6d4fa092252275ab82f409dd8f79fe.tar.zst nixpkgs-1df6cf5d1d6d4fa092252275ab82f409dd8f79fe.zip |
nixos/lock-kernel-modules: fix deferred fileSystem mounts
Ensure that modules required by all declared fileSystems are explicitly loaded. A little ugly but fixes the deferred mount test. See also https://github.com/NixOS/nixpkgs/issues/29019
-rw-r--r-- | nixos/modules/security/lock-kernel-modules.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/security/lock-kernel-modules.nix b/nixos/modules/security/lock-kernel-modules.nix index 30fdb1e2bab..c81521ed9b0 100644 --- a/nixos/modules/security/lock-kernel-modules.nix +++ b/nixos/modules/security/lock-kernel-modules.nix @@ -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"; |