[Top][All Lists]

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

Re: Defining custom services in /etc/config.scm

From: Carlo Zancanaro
Subject: Re: Defining custom services in /etc/config.scm
Date: Mon, 25 Jan 2021 09:25:10 +1100
User-agent: mu4e 1.4.14; emacs 27.1

Hi Sergiu!

On Mon, Jan 25 2021, Sergiu Ivanov wrote:
I understand that I should somehow construct a <service> (?) from my <shepherd-service>, but I don't see a way to do it.

Unfortunately Guix overloads the word "service", where we have (a) services that consist of structured modifications to an operating system, and (b) shepherd services that define a process that will run on the resulting system. Shepherd services cannot be used directly, but need to be added to an instance of the shepherd-root-service-type service. The easiest way to do this is to use simple-service (documented in "(guix) Service Reference" in the manual).

Putting it together, this should return a service object which runs your redshift shepherd service:

(simple-service 'redshift-service 'shepherd-root-service-type (list redshift-service))

I hope that helps!


reply via email to

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