initrd-boot-gui: add option to disable
Killing the GUI on my device causes a crash.
{ config, lib, pkgs, ... }:
let
+ inherit (lib) mkIf mkOption types;
+ cfg = config.mobile.boot.stage-1.gui;
minimalX11Config = pkgs.runCommand "minimalX11Config" {
allowedReferences = [ "out" ];
} ''
@@ -18,6 +20,15 @@ let
'';
in
{
+ options.mobile.boot.stage-1.gui = {
+ enable = mkOption {
+ type = types.bool;
+ default = true;
+ description = "enable splash and boot selection GUI";
+ };
+ };
+
+ config = mkIf cfg.enable {
mobile.boot.stage-1.contents = with pkgs; [
{
object = "${pkgs.mobile-nixos.stage-1.boot-error}/libexec/boot-error.mrb";
@@ -41,4 +52,5 @@ in
XKB_CONFIG_ROOT = "/etc/X11/xkb";
XLOCALEDIR = "/etc/X11/locale";
};
+ };
}
