1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-09-20 00:11:59 +03:00
mobile-nixos/modules/initrd-fail.nix
Samuel Dionne-Riel 8d182d07d2 boot/error: Rework UI for better reporting
First, right now we're putting the full error message front and center,
rather than the sad phone.

We're keeping the sad face though, but only as an accent icon.

Finally, not part of this PR, we'll add actions to abort a total crash.
2020-11-13 19:46:44 -05:00

37 lines
709 B
Nix

{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkOption types;
cfg = config.mobile.boot.stage-1.fail;
in
{
options.mobile = {
boot.stage-1.fail = {
reboot = mkOption {
type = types.bool;
default = true;
description = ''
Reboots the device after a delay on failure.
'';
};
delay = mkOption {
type = types.int;
default = 10;
description = ''
Duration (in seconds) before a reboot on failure.
'';
};
};
};
config = {
mobile.boot.stage-1.contents = [
{
object = (builtins.path { path = ../artwork/sad.svg; });
symlink = "/sad.svg";
}
];
};
}