1 { config, lib, pkgs, ... }:
3 cfg = config.boot.uvesafb;
4 inherit (lib) mkIf mkEnableOption mkOption types;
8 enable = mkEnableOption "uvesafb";
12 default = "1024x768-32";
13 description = "Screen resolution in modedb format. See [uvesafb](https://docs.kernel.org/fb/uvesafb.html) and [modedb](https://docs.kernel.org/fb/modedb.html) documentation for more details. The default value is a sensible default but may be not ideal for all setups.";
16 v86d.package = mkOption {
18 description = "Which v86d package to use with uvesafb";
19 defaultText = ''config.boot.kernelPackages.v86d.overrideAttrs (old: {
20 hardeningDisable = [ "all" ];
22 default = config.boot.kernelPackages.v86d.overrideAttrs (old: {
23 hardeningDisable = [ "all" ];
28 config = mkIf cfg.enable {
30 kernelModules = [ "uvesafb" ];
31 extraFiles."/usr/v86d".source = cfg.v86d.package;
35 "video=uvesafb:mode:${cfg.gfx-mode},mtrr:3,ywrap"
36 ''uvesafb.v86d="${cfg.v86d.package}/bin/v86d"''