Background
I’m new to Guix and Guile but not Lisp (I’m comfortable with Emacs Lisp and Common Lisp) or GNU/Linux. I love the Lispyness and declarative system configuration that Guix enables (along with many of it’s powerful features). While I love it in theory, figuring it out has not been easy for me. While I was able to get Guix System running on my Laptop a few months ago (last time I had time lol) I eventually came to the conclusion that Guix System was not a viable solution for me (too many of the things I use or am asked to use for my actual life and work aren’t packaged and working for Guix and I simply don’t have the time or energy (or in many cases skill) to figure out workarounds (VM’s, guix shell, elfpatching and craziness) or manually fix all the packages.
After coming to that conclusion, I put it on hold for a while as I got busy and kept on using my old laptop. Now I have some time again and want to get my new system running. To fix the problem with Guix System not supporting important things I need well enough, I decided to use a minimal installation of Arch as my base and get as many programs as I can installed with Guix and let other stuff fall through to other methods.
My ultimate goal (given I don’t foresee Guix improving enough in the near term) is to make my own Lispy system management framework that works as an abstraction over my system in Common Lisp (where I feel much more comfortable). While I don’t have the system engineering abilities to make a full solution like the Guix Dev’s I think that for the things I need I can (if I get the time) make a more reasonable programmable system framework that would then use Guix (and other tools) in the background for the things that are outside of my ability to implement on my own.
Problem
Despite this general setup having lots of promise for my use-case, I’m having some issues figuring out the Guix side of things again. Specifically, I can’t figure out how to get the locale stuff set up properly.
As recommended by the manual, I want to build just the primary locale that I use. I.e. in this form shown in the manual:
(use-modules (gnu packages base))
(define my-glibc-locales
(make-glibc-utf8-locales
glibc
#:locales (list "en_CA" "fr_CA" "ik_CA" "iu_CA" "shs_CA")
#:name "glibc-canadian-utf8-locales"))
While I was eventually able to figure out how to install the custom package, I put it in a separate file and ran guix package --install-from-file=locales.scm
on it as shown in this blog post on cosarara.me - Setting up guix, and locales, when I run guix home reconfigure path/to/file.scm
to actually apply it using my home configuration that has the name of my custom package in the specification->package
form, it errors out and claims that the package is not defined.
I presume this means that I need to be manually loading all of the required files in my configuration and can’t assume anything to be inhereited from the guix-profile state.
This brings me to my main questions:
- What are working, clean ways of doing things like this? I’ve tried to find example configurations so I can see how the stuff in the manual actually fits together in practice, but most I’ve actually found haven’t been touched in years or implement lots of undocumented custom stuff on top of Guix.
- How can I get a better look at how these things actually function. If this were Common Lisp, I could just get in Emacs on my main computer and M-. around to at least get a clue. Maybe things would be even be documented lol. In Guile, though I have installed Geiser on my current computer, I can’t seem to actually load any of the Guix packages (despite also having a Guix installation there).
Thanks in advance!
Edit: I didn’t mention before, but I did figure this specific case out. The make-glibc-utf8-locales
form returns a literal package record(?) so if you do it all in one file (or if I figure out the proper way to load if in a loaded file) you can then have it be appended with, cons’d onto, or spliced with the specification->package
list. The more general questions of how loading works and how I would be able to figure these things out on my own still remain.