1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 19:23:01 +03:00
mobile-nixos/modules/initrd-boot-gui.nix
2020-02-29 16:10:00 -05:00

32 lines
820 B
Nix

{ config, lib, pkgs, ... }:
let
boot-gui = ../boot/gui;
key-held = pkgs.runCommand "key-held.mrb" {} ''
${pkgs.buildPackages.mruby}/bin/mrbc -o $out ${../boot/applets}/key-held.rb
'';
boot-selection = pkgs.runCommand "boot-selection.mrb" {} ''
${pkgs.buildPackages.mruby}/bin/mrbc -o $out ${boot-gui}/lib/*.rb ${boot-gui}/main.rb
'';
in
{
mobile.boot.stage-1.contents = with pkgs; [
{
object = (builtins.path { path = ../artwork/logo/logo.white.svg; });
symlink = "/etc/logo.svg";
}
{
object = boot-selection;
symlink = "/applets/boot-selection.mrb";
}
{
object = key-held;
symlink = "/applets/key-held.mrb";
}
];
mobile.boot.stage-1.extraUtils = with pkgs; [
# Used for `key-held.mrb`.
{ package = pkgsStatic.evtest; }
];
}