framenix: set battery charge limit of 85% at boot
This commit is contained in:
parent
67d3404631
commit
5e4f585842
|
@ -35,6 +35,18 @@ in
|
|||
"amdgpu.abmlevel=1" # adaptive backlight management
|
||||
];
|
||||
|
||||
# at boot by default, limit charging capacity to protect battery.
|
||||
# Hopefully there's gonna be a standard interface to control this from the desktop at some point.
|
||||
systemd.services.battery-charge-limit = {
|
||||
wantedBy = [ "basic.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${lib.getExe pkgs.framework-tool} --driver portio --charge-limit 85";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
|
Loading…
Reference in a new issue