-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from numtide/graphics-module-initrd
Add the graphics card driver modules to the initrd
- Loading branch information
Showing
3 changed files
with
16 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
{ lib, config, ... }: | ||
let | ||
facterLib = import ../../lib/lib.nix lib; | ||
in | ||
{ | ||
options.facter.graphics.enable = lib.mkEnableOption "Enable the Graphics module" // { | ||
default = builtins.length (config.facter.report.hardware.monitor or []) > 0; | ||
default = builtins.length (config.facter.report.hardware.monitor or [ ]) > 0; | ||
}; | ||
|
||
config.hardware.graphics.enable = lib.mkIf config.facter.graphics.enable (lib.mkDefault true); | ||
config = lib.mkIf config.facter.graphics.enable { | ||
hardware.graphics.enable = lib.mkDefault true; | ||
boot.initrd.kernelModules = facterLib.stringSet ( | ||
facterLib.collectDrivers (config.facter.report.hardware.graphics_card or [ ]) | ||
); | ||
}; | ||
} |