The biggest problem is usually the battery just plain giving up. Sometimes blowing up like a balloon and damaging the case. Unfortunately Apple makes it quite challenging to replace the battery on an Air, or any of their modern laptops.
On the older airs, it's very simple. I finally got around to replacing the battery on a 2011 air that I still use every day. Cost about $65 and took about ten minutes. The kit even came with the odd little screwdriver bits I needed.
I’ve got a 2013 Air. I’ve replaced the battery twice and doubled the size of the SSD. Compared to replacing the battery on an iPhone, it’s a piece of cake.
Just buy the battery from iFixit and follow their online instructions.
I run NixOS on several old Chromebooks with 2 GB RAM and 16 GB drives. It's doable if you stay on top of garbage collection. YMMV depending on your use case.