treewide: use optional instead of 'then []'
This commit is contained in:
committed by
Anderson Torres
parent
175e9d1f00
commit
933a41a73f
@@ -22,12 +22,11 @@ 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;
|
||||
optionals (x.device != null) (
|
||||
if x.fsType == "vfat"
|
||||
then [ "vfat" "nls-cp437" "nls-iso8859-1" ]
|
||||
else [ x.fsType ])
|
||||
) config.system.build.fileSystems;
|
||||
|
||||
systemd.services.disable-kernel-module-loading = {
|
||||
description = "Disable kernel module loading";
|
||||
|
||||
Reference in New Issue
Block a user