Help installing acer-wmi-battery (battery protection module)

So I can’t seem to figure out how to install this github package I need to limit my battery to 80%. I already had it installed previously but I forgot how I did it and now I’m stuck.

The url: GitHub - frederik-h/acer-wmi-battery: A linux kernel driver for the Acer WMI battery health control interface
Instructions for installing:
sudo apt install build-essential linux-headers-$(uname -r) git
git clone GitHub - frederik-h/acer-wmi-battery: A linux kernel driver for the Acer WMI battery health control interface
cd acer-wmi-battery
make

I have tried running make with gnumake, linuxHeaders…

For some reason I keep getting errors like this:
mkdir: cannot create directory ‘.tmp_188303’: Read-only file system
mkdir: cannot create directory ‘.tmp_188308’: Read-only file system
mkdir: cannot create directory ‘.tmp_188313’: Read-only file system
mkdir: cannot create directory ‘.tmp_188318’: Read-only file system
mkdir: cannot create directory ‘.tmp_188323’: Read-only file system
mkdir: cannot create directory ‘.tmp_188326’: Read-only file system
mkdir: cannot create directory ‘.tmp_188344’: Read-only file system
mkdir: cannot create directory ‘.tmp_188347’: Read-only file system
mkdir: cannot create directory ‘.tmp_188356’: Read-only file system
ln: failed to create symbolic link ‘source’: Read-only file system
make[3]: *** [/nix/store/6ivk2k90j83iv826p014hw37dml71ba5-linux-6.6.44-dev/lib/modules/6.6.44/source/Makefile:652: outputmakefile] Error 1
make[2]: *** [/nix/store/6ivk2k90j83iv826p014hw37dml71ba5-linux-6.6.44-dev/lib/modules/6.6.44/source/Makefile:798: include/config/auto.conf] Error 2
make[2]: *** [include/config/auto.conf] Deleting file ‘include/generated/rustc_cfg’
make[2]: unlink: include/generated/rustc_cfg: Read-only file system
make[2]: *** [include/config/auto.conf] Deleting file ‘include/generated/autoconf.h’
make[2]: unlink: include/generated/autoconf.h: Read-only file system
make[1]: *** [/nix/store/6ivk2k90j83iv826p014hw37dml71ba5-linux-6.6.44-dev/lib/modules/6.6.44/source/Makefile:234: __sub-make] Error 2
make[1]: Leaving directory ‘/nix/store/6ivk2k90j83iv826p014hw37dml71ba5-linux-6.6.44-dev/lib/modules/6.6.44/build’
make: *** [Makefile:1726: all] Error 2

But I’m not really sure what is wrong.

Consider taking a look at how some other out-of-tree kernel modules are packages in nixpkgs. You’d probably want to do something similar.

Sorry for late reply, but i also need help with this. It is very hard to find any information on how to install this specific module, and ive tried to limit battery charge with TLP to no avail. There isnt either a specific way to install this module on NixOS, as the tutorial listed on the Github page for this module is only for Debian/Ubuntu/Arch. There was also a general way (basically for all distros) and it didnt work for me either ;-;… I just want my laptop to live longer lol