mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 19:23:01 +03:00
f9b5868c1a
This is upstream in-use by google for chromebooks, which means some support for some advanced things. This especially means animations can be handled by ply-image if so desired.
46 lines
977 B
Nix
46 lines
977 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
with import ./initrd-order.nix;
|
|
|
|
let
|
|
cfg = config.mobile.boot.stage-1.splash;
|
|
in
|
|
{
|
|
options.mobile.boot.stage-1.splash = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
description = ''
|
|
Enables splash screen.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config.mobile.boot.stage-1 = lib.mkIf cfg.enable (mkMerge [
|
|
{
|
|
init = lib.mkOrder AFTER_FRAMEBUFFER_INIT ''
|
|
show_splash() {
|
|
ply-image /$1.png > /dev/null 2>&1
|
|
}
|
|
|
|
show_splash loading
|
|
'';
|
|
extraUtils = [
|
|
{ package = pkgs.ply-image; extraCommand = "cp -pv ${pkgs.glibc.out}/lib/libpthread.so.* $out/lib"; }
|
|
];
|
|
contents = [
|
|
{ object = ../loading.png; symlink = "/loading.png"; }
|
|
];
|
|
}
|
|
{
|
|
init = lib.mkOrder READY_INIT ''
|
|
show_splash splash
|
|
'';
|
|
contents = [
|
|
{ object = ../temp-splash.png; symlink = "/splash.png"; }
|
|
];
|
|
}
|
|
]);
|
|
}
|