mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-29 16:24:10 +00:00
nixos/security.lockKernelModules: remove with lib;
This commit is contained in:
parent
264f1b4941
commit
97b9c7bfcc
@ -1,15 +1,12 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
meta = {
|
||||
maintainers = [ maintainers.joachifm ];
|
||||
maintainers = [ lib.maintainers.joachifm ];
|
||||
};
|
||||
|
||||
options = {
|
||||
security.lockKernelModules = mkOption {
|
||||
type = types.bool;
|
||||
security.lockKernelModules = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Disable kernel module loading once the system is fully initialised.
|
||||
@ -20,9 +17,9 @@ with lib;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.security.lockKernelModules {
|
||||
boot.kernelModules = concatMap (x:
|
||||
optionals (x.device != null) (
|
||||
config = lib.mkIf config.security.lockKernelModules {
|
||||
boot.kernelModules = lib.concatMap (x:
|
||||
lib.optionals (x.device != null) (
|
||||
if x.fsType == "vfat"
|
||||
then [ "vfat" "nls-cp437" "nls-iso8859-1" ]
|
||||
else [ x.fsType ])
|
||||
|
Loading…
Reference in New Issue
Block a user