[Top][All Lists]

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

Defining shepherd user services -- feedback desired

From: Alex ter Weele
Subject: Defining shepherd user services -- feedback desired
Date: Sat, 03 Feb 2018 19:13:10 -0600

Attached is a manifest file which allows a user to write a
shepherd-service like the following:

(define redshift-service
   (provision '(redshift))
   (modules `((gnu packages xdisorg)
   (start #~(make-forkexec-constructor
             (list (string-append #$redshift "/bin/redshift")
                   "-l" "50:4")))))

And transform it into a package:

(services->package (list redshift-service))

This allows it to be included in a user's profile. This unites the
definition of a service with its dependencies (redshift, in the example
above). A user would not have to install a package just to use it as a
service, nor would they have to hand-write a Shepherd configuration

It may be desired to add services->package and my edited version of
shepherd-configuration-file to Guix. I have not written a patch, though,
because I am unsure where it should go and some FIXMEs remain. Feedback
would be much appreciated!

Attachment: user-services.scm
Description: Binary data

reply via email to

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