NB: Organizing a basic system config

Hello All!
A series of very noob questions. I’ve been having a hard time splitting my Guix configuration into multiple files a la System Crafters webpage. So far I’ve just been trying to setup my base system configuration this way, I haven’t been brave enough to try home configuration yet, but it is something I want to try.

I’m posting my (somewhat misleadingly named) single-file configuration below.
minimal-config.scm (9.1 KB)

Ideally, I want to split it into two files:

  • sarah.scm ← Configuration for my thinkpad laptop (wifi drivers, required microcode, drive UUIDs and mounts, etc).
  • base-config.scm ← System wide configuration (user setup, nonguix packages, some base packages, tty console setup)

For some of the things in the base configuration, I’m not exactly sure what the “typical” setup would look like, particularly for something like xorg (or wayland) setup. Would that usually go into the base configuration, or the home setup? What about the xorg drivers?

For more specific questions, for the firmware I want to have the %base-firmware in my base-config, and then include iwlwifi-firmware in sarah. How do I do that? Similarly, I would like to append some extra services (thinkpad-services) in sarah on top of those specified in base-config. More generally, how do I modify a list set in base-config once I’ve inherited it in sarah?

What exactly are the (use-package-modules ...) and (use-service-modules ...) functions doing? I think my search-fu has failed me, but I couldn’t find any documentation for either of them. Any hints on locally searching the Guix documentation would be appreciated.

When specifying packages to include, is it prefered to use (specifications->package "<package name>") or just (list pkg1 pkg2 ...)? What module do I need to import for the latter to work?

Last, my configuration seems to pull in a lot more dependencies than I really want (all of GNOME IIRC), is there a way to make that not happen? (What am I doing that is causing that behavior?)

I’m sure I’m doing many things suboptimally here, so general advice would be appreciated.

2 Likes