1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-15 19:23:01 +03:00
mobile-nixos/modules/initrd-base.nix
Samuel Dionne-Riel 41af579ea5 hard-*: Adds hard-shutdown script
On my qualcomm devices, it really shuts down the device even when
plugged into power.
2019-06-09 22:16:43 -04:00

26 lines
443 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.mobile.boot.stage-1;
in
{
options.mobile.boot.stage-1.hard-reboot = {
enable = mkOption {
type = types.bool;
default = true;
description = ''
Adds hard-reboot/hard-shutdown script.
'';
};
};
config.mobile.boot.stage-1 = {
extraUtils = with pkgs; lib.mkIf cfg.hard-reboot.enable [
hard-reboot
hard-shutdown
];
};
}