mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/security.lockKernelModules: remove with lib;
This commit is contained in:
parent
264f1b4941
commit
97b9c7bfcc
1 changed files with 6 additions and 9 deletions
|
@ -1,15 +1,12 @@
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
meta = {
|
meta = {
|
||||||
maintainers = [ maintainers.joachifm ];
|
maintainers = [ lib.maintainers.joachifm ];
|
||||||
};
|
};
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
security.lockKernelModules = mkOption {
|
security.lockKernelModules = lib.mkOption {
|
||||||
type = types.bool;
|
type = lib.types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = ''
|
description = ''
|
||||||
Disable kernel module loading once the system is fully initialised.
|
Disable kernel module loading once the system is fully initialised.
|
||||||
|
@ -20,9 +17,9 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.security.lockKernelModules {
|
config = lib.mkIf config.security.lockKernelModules {
|
||||||
boot.kernelModules = concatMap (x:
|
boot.kernelModules = lib.concatMap (x:
|
||||||
optionals (x.device != null) (
|
lib.optionals (x.device != null) (
|
||||||
if x.fsType == "vfat"
|
if x.fsType == "vfat"
|
||||||
then [ "vfat" "nls-cp437" "nls-iso8859-1" ]
|
then [ "vfat" "nls-cp437" "nls-iso8859-1" ]
|
||||||
else [ x.fsType ])
|
else [ x.fsType ])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue