Subject: [bug#76081] [PATCH v10 6/7] services: oci: Migrate oci-configuration to (guix records).

From: Maxim Cournoyer <[email-masked]>
Date: Fri, 16 May 2025 11:02:34 +0900

Hi,

Giacomo Leidi <[email-masked]> writes:

> This commit migrates oci-configuration to (guix records) singe it
> appears (for-home (oci-configuration ...)) does not work as expected
> with (gnu services configuration).  This is supposed to be completely
> transparent for users and can be reverted in the
> future once this has been implemented.
>
> * gnu/service/containers.scm: Migrate oci-configuration to (guix records).

I'd like to understand and resolve this issue and avoid pushing this
commit.  What is the errors you are seeing?  It at least byte-compiles
fine with this commit reverted and the following diff applied:

--8<---------------cut here---------------start------------->8---
modified   gnu/home/services/containers.scm
@@ -32,16 +32,14 @@ (define home-oci-service-type
                 (extensions
                  (list
                   (service-extension home-profile-service-type
-                                     (oci-service-extension-wrap-validate
-                                      (lambda (config)
-                                        (let ((runtime-cli
-                                               (oci-configuration-runtime-cli config))
-                                              (runtime
-                                               (oci-configuration-runtime config)))
-                                          (oci-service-profile runtime runtime-cli)))))
+                                     (lambda (config)
+                                       (let ((runtime-cli
+                                              (oci-configuration-runtime-cli config))
+                                             (runtime
+                                              (oci-configuration-runtime config)))
+                                         (oci-service-profile runtime runtime-cli))))
                   (service-extension home-shepherd-service-type
-                                     (oci-service-extension-wrap-validate
-                                      oci-configuration->shepherd-services))))
+                                     oci-configuration->shepherd-services)))
                 (extend
                  (lambda (config extension)
                    (for-home
--8<---------------cut here---------------end--------------->8---

Also, there are other home services using a define-configuration'd
record with for-home, such as the home-snuik-service-type, so it should
be possible to make it work.

-- 
Thanks,
Maxim