help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Modification of Services with External Definitions of Clause Bodies


From: Marek Paśnikowski
Subject: Modification of Services with External Definitions of Clause Bodies
Date: Thu, 23 May 2024 14:58:16 +0200

Good day to you all.

I am trying to achieve the following configuration pattern:

(define-public %distribution-services
  (modify-services %desktop-services
                   (1-service-type config => 1-change)
                   (2-service-type config => 2-change)
                   (3-service-type config => 3-change)
                   ...
                   (n-service-type config => n-change)))

Each k-change is to be defined in its own, external module almost like this:

(define-public k-change
  (lambda (config)
    (k-service-configuration (inherit config)
                             ...
                             (n-customization)))

I wrote almost, because the presented pattern still fails to execute.
Regardless, this is the furthest I was able to go — this approach fails during
system reconfiguration, as opposed to the other attempts which failed during
guix pull.

The error message:

In procedure struct-vtable:
Wrong type argument in posistion 1 (expecting struct):
#<procedure k-change (config)>

I know WHY it fails - lambdas do return procedures.  My question to you is,
how can I modify the k-change definition to have it return the appropriate
service configuration structure?

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]