On 2/2/26 23:22, whk via wrote:
I have a couple of questions on using dependencies in confg.scm file-system definitions.
...

 * How do I specify that 'mount-point "/"' is required before mounting
   'mount-point "/mnt/ioSafeDuo"'?

 * How do I specify specific mapped-device entries as dependencies for
   different file-system entries (e.g. cryptroot for "/" and
   ioSafeDuo0{1|2}Data for "/mnt/ioSafeDuo")?

I think I solved the second question by defining the mapped-devices and putting the variables in both mapped-devices and the file-system dependency.

I tried the same idea with file-system but when I uncomment %my-file-system-root from the dependency a 'guix system reconfigure' returns an error "guix system: error: service 'file-system-/mnt/ioSafeDuo' requires 'file-system-/', which is not provided by any service"

Is this the right approach and what am I missing to specify a file-system as a dependency?

Current config:

   ...
   (define %my-mapped-device-cryptroot
      (mapped-device
        (source (uuid
                 "10d6c832-f8c5-45df-b11f-6119a85de83f"))
        (target "cryptroot")
        (type luks-device-mapping)))
   (define %my-mapped-device-ioSafeDuoD1Data
      (mapped-device
        (source (uuid
                 "c85979d2-a080-41dc-8ac1-373975ead97f"))
        (target "ioSafeDuoD1Data")
        (arguments '(#:key-file "/etc/luks.secrets/ioSafeDuo.key"))
        (type luks-device-mapping)))
   (define %my-mapped-device-ioSafeDuoD2Data
      (mapped-device
        (source (uuid
                 "a14cd713-7c70-4760-98dd-ab04b41237f6"))
        (target "ioSafeDuoD2Data")
        (arguments '(#:key-file "/etc/luks.secrets/ioSafeDuo.key"))
        (type luks-device-mapping)))
     (define %my-file-system-root
       (file-system
         (mount-point "/")
         (device "/dev/mapper/cryptroot")
         (type "ext4")
         (dependencies (list %my-mapped-device-cryptroot))
       ))

   (operating-system
   ...
     (mapped-devices (list
        %my-mapped-device-cryptroot
        %my-mapped-device-ioSafeDuoD1Data
        %my-mapped-device-ioSafeDuoD2Data
                          ))

      ;; The list of file systems that get "mounted".  The unique
      ;; file system identifiers there ("UUIDs") can be obtained
      ;; by running 'blkid' in a terminal.
      (file-systems (cons* (file-system
                             (mount-point "/boot/efi")
                             (device (uuid "F39E-B8E5"
                                           'fat32))
                             (type "vfat"))
                           %my-file-system-root
                           (file-system
                             (mount-point "/mnt/ioSafeDuo")
                             (device (file-system-label "ioSafeDuoData"))
                             (type "btrfs")
                             (mount? #t)
                             (mount-may-fail? #t)
                             (dependencies (list
        ;; %my-file-system-root
        %my-mapped-device-ioSafeDuoD1Data
        %my-mapped-device-ioSafeDuoD2Data)
                            ))
                            %base-file-systems)))

Reply via email to