mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-30 06:49:43 +01:00
Update asus/battery.nix
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
This commit is contained in:
parent
a9de532758
commit
4161f8aee8
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
options.hardware.asus.chargeUpto = lib.mkOption {
|
options.hardware.asus.battery.chargeUpto = lib.mkOption {
|
||||||
description = "Maximum level of charge for your battery, as a percentage.";
|
description = "Maximum level of charge for your battery, as a percentage.";
|
||||||
default = 100;
|
default = 100;
|
||||||
type = lib.types.int;
|
type = lib.types.int;
|
||||||
|
@ -15,7 +15,7 @@ in
|
||||||
config = {
|
config = {
|
||||||
environment.systemPackages = [ p ];
|
environment.systemPackages = [ p ];
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"w /sys/class/power_supply/BAT0/charge_control_end_threshold - - - - ${toString cfg.chargeUpto}"
|
"w /sys/class/power_supply/BAT0/charge_control_end_threshold - - - - ${toString cfg.battery.chargeUpto}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue