[Top][All Lists]

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

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

From: Ekaitz Zarraga
Subject: Re: Defining custom services in /etc/config.scm
Date: Sun, 24 Jan 2021 19:19:45 +0000

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, January 24, 2021 8:09 PM, Sergiu Ivanov <> wrote:

> Hello,
> I'm trying to start redshift [0] as a shepherd service, and this is how
> I defined the redshift service in my /etc/config.scm:
> (define evry-geolocation "48.63681:2.42777")
> (define redshift-service
> (shepherd-service
> (provision '(redshift))
> (requirement '(xorg-server))
> (documentation "Start Redshift as a service")
> (start #~(make-forkexec-constructor
> `("redshift" "-l" ,evry-geolocation)))
> (stop #~(make-kill-destructor))))
> However, I can't find a way to add this to the services field of the
> operating-system declaration.
> When I try:
> (services (append
> (list redshift-service
> (service xfce-desktop-service-type)
> (set-xorg-configuration
> (xorg-configuration (keyboard-layout keyboard-layout))))
> %desktop-services))
> I get the message "Wrong type argument #<<shepherd-service> ...".
> I understand that I should somehow construct a <service> (?) from my
> <shepherd-service>, but I don't see a way to do it.
> I've also seen a couple mailing list discussions [1,2] and a blog post
> [3] about doing what I want in "pure shepherd", i.e. independently of
> Guix, but these solutions seem to be doing more than what I need.
> How can I add a custom shepherd service to the operating-system
> definition in /etc/config.scm?
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Sergiu
> [0]
> [1]
> [2]
> [3]

Hi Sergiu,

I recently made my redshift configuration using shepherd user
services, which is what people in IRC recommended me.

You can find it here:

Also, it forces me to run the shepherd as a user using my i3 config.

I also wanted to configure it in my config.scm file but people
convinced me not to do so.

I'm not sure why your case shouldn't work though.


reply via email to

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