guix-patches
[Top][All Lists]
Advanced

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

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


From: Ludovic Courtès
Subject: bug#27155: [PATCH 0/2] Support service extensions on the "final" service values
Date: Thu, 01 Jun 2017 13:24:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi Alex,

Alex Kost <address@hidden> 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’.





reply via email to

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