1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 19:23:01 +03:00
mobile-nixos/modules/initrd-splash.nix
2018-06-20 20:18:44 -04:00

49 lines
938 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() {
echo | fbv -caferi /$1.png > /dev/null 2>&1
}
show_splash loading
'';
extraUtils = [
pkgs.fbv
];
contents = [
{ object = ../loading.png; symlink = "/loading.png"; }
];
}
{
init = lib.mkOrder READY_INIT ''
show_splash splash
'';
extraUtils = [
pkgs.fbv
];
contents = [
{ object = ../temp-splash.png; symlink = "/splash.png"; }
];
}
]);
}