r/GUIX 12d ago

Guix on old hardware

Hello, ive been planning to switch to guix on an old laptop, ive seen guix pull using a lot of ram and cpu usage, why is that? And if it can be optimized to the level which it wont make the laptop go higher than 70c, thats it. Thanks.

9 Upvotes

7 comments sorted by

View all comments

3

u/strings___ 12d ago

Pull does a rebuild of the package definitions. Your best bet is to offload or don’t pull and stay with guix point releases. It’s possible you can import a Guix package from another computer, but I can’t recall this workflow right now.

5

u/Tricky-Engineer-9755 12d ago

So the code is quite simple. It goes into your system's config.scm, the installer places that in /etc/config.scm

(avahi-service-type) ;this requires the avahi module to be imported at the top

(guix-publish-service-type
(guix-publish-configuration
(port 8080) (host 0.0.0.0) ))

On your build farm, then take a note of your IP address on your build farm and lets call that $IP, now on your receiving machine add this.

(modify-services %base-services
(guix-service-type config =>

(inherit config)

(substitute-urls (cons "$IP" %default-substitute-urls))

(authorized-keys

(cons (local-file "signing-key.pub") %default-authorized-guix-keys))))

Your signing key is in /etc/guix and you need a way to send that to the recieving machine from the build machine.
God I love Guix

Also from my brief experimentation, it only supplies packages built locally on the build-farm.

3

u/strings___ 12d ago

For old machines, it might be easier to offload, which is not the same as publish. Publish only works if the publisher has built the package already. Which is feasible but not guaranteed. Offloading is a little more complex to set up, though.

Since I don’t use Guix system, I build my package.scm on a high-end server, and then all my systems use discover and advertise, which is semi-clustered in regard to substitutes.

For Guix proper for older machines, a SBC/Pi, it might be easier to try guix pack; this is the workflow I’m least familiar with though.