Subject: Re: bug#27155: [PATCH 0/2] Support service extensions on the "final" service values

From: [email-masked] (Ludovic Courtès)
Date: Thu, 01 Jun 2017 13:24:38 +0200

Hi Alex,

Alex Kost <[email-masked]> skribis:

> This is great!  Just what I wanted, and thanks for this example!  Based
> on it, I made the following service:
>
>   (define replace-etc/profile-type
>     (let ((replace
>            (lambda (file entries)
>              (cons `("profile" ,file)
>                    (map (match-lambda
>                           ((name . rest)
>                            (cons (if (string= name "profile")
>                                      (string-append "original-profile")
>                                      name)
>                                  rest)))
>                         entries)))))
>       (service-type
>        (name 'replace-etc/profile)
>        (extensions (list (service-extension etc-service-type
>                                             (const '())
>                                             replace))))))
>
>   (service replace-etc/profile-type (local-file ".../my-system-profile"))
>
> So now I can use my own "/etc/profile", moreover I can look at the
> "/etc/original-profile" anytime.  I already use a system with this
> service and I enjoy it, thanks a lot!

Awesome, I’m glad you like it!  It was long overdue.

Thanks for taking the time to test!

Ludo’.