From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WF2sIBLGDWA0TAAA0tVLHw (envelope-from ) for ; Sun, 24 Jan 2021 19:10:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id qBhzHBLGDWD5GwAAbx9fmQ (envelope-from ) for ; Sun, 24 Jan 2021 19:10:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B4B789404C4 for ; Sun, 24 Jan 2021 19:10:09 +0000 (UTC) Received: from localhost ([::1]:32932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l3km0-0003NA-Nz for larch@yhetil.org; Sun, 24 Jan 2021 14:10:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57286) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3klh-0003N3-Bu for help-guix@gnu.org; Sun, 24 Jan 2021 14:09:49 -0500 Received: from marvid.fr ([163.172.81.107]:41084 helo=courriel.marvid.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3klf-0003sw-9X for help-guix@gnu.org; Sun, 24 Jan 2021 14:09:48 -0500 Received: from localhost (schwifty.marvid.fr [51.159.4.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by sahkopoika (Postfix) with ESMTPSA id 73E1447F1B3B for ; Sun, 24 Jan 2021 20:09:07 +0100 (CET) User-agent: mu4e 1.4.13; emacs 27.1 From: Sergiu Ivanov To: help-guix Subject: Defining custom services in /etc/config.scm Date: Sun, 24 Jan 2021 20:09:07 +0100 Message-ID: <874kj6duek.fsf@colimite.fr> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=163.172.81.107; envelope-from=sivanov@colimite.fr; helo=courriel.marvid.fr X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 5.0 requ) BAYES_00=-1.9, FORGED_SPF_HELO=2.297, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.35 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: B4B789404C4 X-Spam-Score: -2.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: ijOiTU2wbm6z 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 #< ...". I understand that I should somehow construct a (?) from my , 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] http://jonls.dk/redshift/ [1] https://lists.gnu.org/archive/html/guix-devel/2018-02/msg00047.html [2] https://www.mail-archive.com/guix-devel@gnu.org/msg46278.html [3] https://guix.gnu.org/blog/2020/gnu-shepherd-user-services/