mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-27 01:44:41 +03:00
41af579ea5
On my qualcomm devices, it really shuts down the device even when plugged into power.
26 lines
443 B
Nix
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
|
|
];
|
|
};
|
|
}
|