I’ve been trying to begin a transition from NixOS to Guix, but I’m having a hard time finding where the different symbols referenced in the Guix/Guile manual are defined. For example, I want to use BTRFS on a LUKS-encrypted device, but I can’t quite find what to #:use-module for the mapped-devices symbol. That is to say:

(file-system
  (device "/dev/mapper/cryptroot")
  (mount-point "/home")
  (type "btrfs")
  (options "subvol=home")
  (dependencies mapped-devices))

The mapped-devices above is an “unbound variable” (according to the errors). I still don’t have this figured out, so how would others go about finding what to “import” since the official examples I’m looking at don’t really tell me anything? (unless I’m blind, very likely!)

  • juipeltje
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 month ago

    Do you actually have mapped-devices declared in your operating-system declaration anywhere? Cause i think that’s what that variable is referring to instead of it coming from a different module. I don’t use mapped-devices myself so not sure, but i have something similar in my swap-device configuration:

    (swap-devices (list
      (swap-space
       (target "/swapfile")
       (dependencies (filter (file-system-mount-point-predicate "/")
                             file-systems)))))
    

    In this snippet file-systems is referring to the file-systems field in my operating-system configuration, i think in your case it might be the same for mapped-devices.

    • LGTM@discuss.tchncs.deOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 month ago

      I do have mapped-devices declared, but it was actually declared AFTER file-systems which made it an unbound variable. Thanks for bringing this to my attention. It’s my fault for not completely understanding scheme first and trying to learn it as I go

      • juipeltje
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 month ago

        Ah, no worries, i’ve only been at it for like 2 months myself. In fact i did not know that the order would matter here, so that’s good to know for me as well.

    • vepr_jako_pepr@slrpnk.net
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 month ago

      yes i believe the way that records are set up, binds the fields of the records in the record scope as their set specifiers