Re: Invoking user shepherd; Was: Re: Defining *user* services in Guix

2017-06-13 Thread Ludovic Courtès
Hello Danny, Danny Milosavljevic skribis: > On Tue, 13 Jun 2017 10:06:16 +0200 > l...@gnu.org (Ludovic Courtès) wrote: > >> The ‘delete-file’ was to avoid EADDRINUSE but I wonder if it’s really a >> good idea. > > Not a good idea. > > We should just put the shepherd socket somewhere in /run/user

Re: Invoking user shepherd; Was: Re: Defining *user* services in Guix

2017-06-13 Thread Danny Milosavljevic
Hi Ludo, On Tue, 13 Jun 2017 10:06:16 +0200 l...@gnu.org (Ludovic Courtès) wrote: > The ‘delete-file’ was to avoid EADDRINUSE but I wonder if it’s really a > good idea. Not a good idea. We should just put the shepherd socket somewhere in /run/user/4711 where 4711 is the user id (the entire nam

Re: Invoking user shepherd; Was: Re: Defining *user* services in Guix

2017-06-13 Thread Ludovic Courtès
Hello! Danny Milosavljevic skribis: > For a real user shepherd, it would be nice if when I logged in twice using > the same user account (without logging out in-between - so resulting in two > sessions of that user) it would still only have one shepherd instance for > that user account in tot

Re: Invoking user shepherd; Was: Re: Defining *user* services in Guix

2017-06-13 Thread Ludovic Courtès
Hello! Mathieu Othacehe skribis: > I wrote a first draft of user services a month ago. The idea here is > that guix user -r user-manifest.scm generates a script that lauches a > user shepherd. > > For instance with the following user-manifest.scm : > > (define (redshift-service config) > (list

Re: Invoking user shepherd; Was: Re: Defining *user* services in Guix

2017-06-11 Thread Mathieu Othacehe
Hi Danny, > Or should we just expect the user to put a (shepherd with fix) > invocation into their HOME startup scripts like .xinitrc ? I wrote a first draft of user services a month ago. The idea here is that guix user -r user-manifest.scm generates a script that lauches a user shepherd. For i

Invoking user shepherd; Was: Re: Defining *user* services in Guix

2017-06-10 Thread Danny Milosavljevic
Hi, I'm revisiting this topic because I want to have a dbus user bus to be available as "${XDG_RUNTIME_DIR}/bus". > > With the attached patch, it is possibe to use (gnu services herd) to > > interact with a user shepherd instance. Nice! It works! But while testing it I noticed: For a real us

Re: Defining user services in Guix.

2017-05-03 Thread Mathieu Othacehe
>> Happy hacking! :-) >> Ludo’. > > Yay! Welcome Mathieu! Thanks Ricardo and Ludo ! Pushed as 5e03b122cf295d24e01861ca942505d47f9aa59e.

Re: Defining user services in Guix.

2017-05-02 Thread Ricardo Wurmus
Ludovic Courtès writes: > Hi! > > Mathieu Othacehe skribis: > >>> Could you create an account on Savannah, add the OpenPGP public key >>> you’ll use to sign commits there, and let us know when you’re done with >>> a signed message? Looks like we should be able to increase the >>> bandwidth. :

Re: Defining user services in Guix.

2017-05-02 Thread Ludovic Courtès
Mathieu Othacehe skribis: > From caf7d9f5a7875663623b24662c1c23b99e60c5ad Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe > Date: Fri, 28 Apr 2017 17:09:53 +0200 > Subject: [PATCH] services: herd: Make %shepherd-socket-file a parameter and > export it. > > * gnu/services/herd.scm (%shepherd-s

Re: Defining user services in Guix.

2017-05-02 Thread Ludovic Courtès
Hi! Mathieu Othacehe skribis: >> Could you create an account on Savannah, add the OpenPGP public key >> you’ll use to sign commits there, and let us know when you’re done with >> a signed message? Looks like we should be able to increase the >> bandwidth. :-) > > Thanks :) I created the accoun

Re: Defining user services in Guix.

2017-05-02 Thread Mathieu Othacehe
Hi Ludo, > Neat, sounds like a good plan! Great ! > Could you create an account on Savannah, add the OpenPGP public key > you’ll use to sign commits there, and let us know when you’re done with > a signed message? Looks like we should be able to increase the > bandwidth. :-) Thanks :) I crea

Re: Defining user services in Guix.

2017-05-02 Thread Ludovic Courtès
Hello Mathieu, Mathieu Othacehe skribis: >> Agreed. A ‘guix user’ tool (or similar) could talk to the user’s >> Shepherd instance to upgrade user services like >> ‘upgrade-shepherd-services’ does in (guix scripts system). > > With the attached patch, it is possibe to use (gnu services herd) to

Re: Defining user services in Guix.

2017-04-28 Thread Mathieu Othacehe
Hi, > Agreed. A ‘guix user’ tool (or similar) could talk to the user’s > Shepherd instance to upgrade user services like > ‘upgrade-shepherd-services’ does in (guix scripts system). With the attached patch, it is possibe to use (gnu services herd) to interact with a user shepherd instance. For

Re: Defining user services in Guix.

2017-04-27 Thread Ludovic Courtès
Hello! Ricardo Wurmus skribis: > Mekeor Melire writes: [...] >> And secondly, each user could have a user.scm e.g. like >> >> (user-configuration >> ; ... >> (aliases >> '( >> ("sysrec" "system reconfigure") >> ("pl" "pull")

Re: Defining user services in Guix.

2017-04-25 Thread Ricardo Wurmus
Mekeor Melire writes: > Mathieu Othacehe writes: > But you can start your own shepherd under your user account and have that shepherd manage user services - it's nice. >> >> Thank you Danny for the details procedure. I'll use that for now ! >> >>> Surely we could do better, like prov

Re: Defining user services in Guix.

2017-04-24 Thread Mekeor Melire
Mathieu Othacehe writes: >>> But you can start your own shepherd under your user account and have that >>> shepherd manage user services - it's nice. > > Thank you Danny for the details procedure. I'll use that for now ! > >> Surely we could do better, like providing unprivileged users with a t

Re: Defining user services in Guix.

2017-04-23 Thread Mathieu Othacehe
Hi guys, >> But you can start your own shepherd under your user account and have that >> shepherd manage user services - it's nice. Thank you Danny for the details procedure. I'll use that for now ! > Surely we could do better, like providing unprivileged users with a tool > akin to ‘guix syst

Re: Defining user services in Guix.

2017-04-22 Thread Carlo Zancanaro
On Sat, Apr 22 2017, Danny Milosavljevic wrote: > Unfortunately, it still doesn't respawn redshift if it dies - it seems > to require a pid file for that (#:start (make-forkexec-constructor ... > #:pid-file "xxx.pid") and you have to specify #:respawn? #t. The > invoked program then has to create "

Re: Defining user services in Guix.

2017-04-22 Thread Ludovic Courtès
Hello, Danny Milosavljevic skribis: > personally, I'd just start it inside ~/.xinitrc, ~/.xsession, > ~/.fluxbox/startup or similar. That's a little old-school, though, but it's > how I always did those things. The disadvantage is that if redshift crashes, > it's not being brought back up.

Re: Defining user services in Guix.

2017-04-22 Thread Danny Milosavljevic
Hi Mathieu, personally, I'd just start it inside ~/.xinitrc, ~/.xsession, ~/.fluxbox/startup or similar. That's a little old-school, though, but it's how I always did those things. The disadvantage is that if redshift crashes, it's not being brought back up. But you can start your own shephe

Defining user services in Guix.

2017-04-22 Thread Mathieu Othacehe
Hi Guix, I just a wrote a small service for redshift¹. Redshift is a program adjusting color temperature of the screen according to surroundings. This program needs to communicate to X, so DISPLAY and XAUTHORITY must be set correctly. The only way I found to make my service work is something ve