[Top][All Lists]

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

Re: Guix shepherd user services

From: Tanguy Le Carrour
Subject: Re: Guix shepherd user services
Date: Wed, 1 May 2019 11:00:58 +0200
User-agent: NeoMutt/20180716

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 <service>
>      #: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`
If I can achieve something without it, it would already be great.

Thanks again for your time!



reply via email to

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