I’m planning to build a computer primarily for programming and want to ensure it’s upgradeable for the future. and Hardware with opensource drivers support.
Replacing peripherals that often is nuts. Buy proper gear instead of wasting your money. My speakers are 20 years old and still look and sound like new, my proper office chair finally needs replacing or repairing but I got it used 24 years ago (do yourself a favor and never buy a “gaming chair”, buy a proper ergonomic office chair meant to sit in 8+ hrs/day). Monitor is 12 years old and works great for anything that doesn’t require >60Hz. Buy quality keyb+mouse and replace them when they break if you can’t repair them.
And depending on what you do, your computer could last longer than you think. I’m still running a first gen Threadripper from 2017 and it still handles everything I’m throwing at it without hesitation, granted I’m not throwing very heavy things at it these days.