File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change 2
2
let
3
3
facterLib = import ../../lib/lib.nix lib ;
4
4
5
- cfg = config . facter . detected . boot . keyboard ;
6
5
inherit ( config . facter ) report ;
7
6
in
8
7
{
9
- options . facter . detected . boot . keyboard . enable =
10
- lib . mkEnableOption "Enable Keyboard support in the initrd"
11
- // {
12
- default = true ;
13
- } ;
8
+ options . facter . detected . boot . keyboard . kernelModules = lib . mkOption {
9
+ type = lib . types . listOf lib . types . str ;
10
+ default = facterLib . collectDrivers ( report . hardware . usb_controller or [ ] ) ;
11
+ example = [ "usbhid" ] ;
12
+ description = ''
13
+ List of kernel modules to include in the initrd to support the keyboard.
14
+ '' ;
15
+ } ;
14
16
15
- config =
16
- lib . mkIf cfg . enable {
17
- boot . initrd . availableKernelModules = facterLib . stringSet (
18
- # Needed if we want to use the keyboard when things go wrong in the initrd.
19
- facterLib . collectDrivers ( report . hardware . usb_controller or [ ] )
20
- ) ;
21
- } ;
17
+ config = {
18
+ boot . initrd . availableKernelModules = config . facter . detected . boot . keyboard . kernelModules ;
19
+ } ;
22
20
}
You can’t perform that action at this time.
0 commit comments