From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tanguy Le Carrour Subject: Re: Guix shepherd user services Date: Wed, 1 May 2019 11:00:58 +0200 Message-ID: <20190501090058.q34wlnxhbn6k3hwg@melmoth> References: <20190429195749.t2kksa5lujoafnlf@melmoth> <87sgu0mv2b.fsf@nckx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:43738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLl6x-0001E5-WE for guix-devel@gnu.org; Wed, 01 May 2019 05:01:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLl6u-00040n-UJ for guix-devel@gnu.org; Wed, 01 May 2019 05:01:07 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60263) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLl6t-0003xa-3x for guix-devel@gnu.org; Wed, 01 May 2019 05:01:03 -0400 Content-Disposition: inline In-Reply-To: <87sgu0mv2b.fsf@nckx> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Tobias Geerinckx-Rice Cc: guix-devel@gnu.org Hi Tobias Thanks for your answers! Le 04/29, Tobias Geerinckx-Rice a écrit : > > I would love to have some services started when I log in […] > Note that this is already possible if you want it: Reading the Shepherd documentation, I was expecting that something like this was possible, but, correct me if I'm wrong, it's not really documented, is it? > ~ λ cat /home/nckx/.config/shepherd/init.scm (load "services.scm") > (register-services emacs gpg-agent ibus-daemon jackd) > (action 'shepherd 'daemonize) ; send shepherd into background > (for-each start (list emacs)) ; services to start automatically > > ~ λ cat /home/nckx/.config/shepherd/services.scm (define emacs > (make > #:provides '(emacs) > #:requires '() > #:start (make-system-constructor "emacs --daemon") > #:stop (make-system-destructor "emacsclient --eval > \"(kill-emacs)\""))) > ;; ...much more snipped... > > ~ λ grep shepherd /home/nckx/.xsession shepherd # user service manager Cooooool! :-) Did you write the "much more snipped" by yourself? If yes, is it available somewhere? Else, is it documented somewhere? Did you copy/paste it from another Guix file? Stupid questions: why aren't you using service types? Whose responsibility should it be to provide the service(-type) definitions (`service.scm`)? The user? Guix? Both? To me, it would make more sense to have the service(-type) definitions come with the packages and have them instantiated/configured by the user, like in the config file used by `guix system reconfigure`? This would be in the file used by `guix user`, wouldn't it? If things were not clear to me, now they are all messed up in my head! ^_^' > The discussion is about how to add it (and user stuff in general) to Guix, > which is a big wriggly bag of tasty worms. What do you mean by "how to add it"? Is it about having a `guix user` command? If I can achieve something without it, it would already be great. Thanks again for your time! Regards -- Tanguy