Re: Don't auto-start a service in Shepherd

2018-03-02 Thread Ludovic Courtès
Hello,

Rutger Helling  skribis:

> Thanks for the replies. My use case is that I don't want to auto-start
> SDDM, since I usually start GNOME (Wayland) from the TTY. However there
> are certain cases where I want to start GNOME on X11, for which I do
> need SDDM.
>
> On systemd you can do "systemctl disable service", so I was wondering if
> there was an equivelant command in Shepherd. Removing the
> service entirely and reconfiguring every time I want to start SDDM
> isn't really what I'm looking for.
>
> I'll have a look at `auto-start?`. I think it would be nice if all
> services exposed this option.

Currently the simplest solution is to expose it for services where the
need is widespread.

Longer-term we may want a more generic mechanism like
.

Thanks,
Ludo’.



Re: Don't auto-start a service in Shepherd

2018-02-26 Thread Rutger Helling
Thanks for the replies. My use case is that I don't want to auto-start
SDDM, since I usually start GNOME (Wayland) from the TTY. However there
are certain cases where I want to start GNOME on X11, for which I do
need SDDM.

On systemd you can do "systemctl disable service", so I was wondering if
there was an equivelant command in Shepherd. Removing the
service entirely and reconfiguring every time I want to start SDDM
isn't really what I'm looking for.

I'll have a look at `auto-start?`. I think it would be nice if all
services exposed this option.

On Sun, 25 Feb 2018 09:27:49 +1100
Carlo Zancanaro  wrote:

> On Fri, Feb 23 2018, Rutger Helling wrote:
> > Is there a way to prevent auto-starting a service in Shepherd? I 
> > find that if I use "herd disable service" it still automatically 
> > starts the service on a reboot/reconfigure.  
> 
> I've just had a look at gnu/services/shepherd.scm, and it looks 
> like system services can set `auto-start?` to #f when creating 
> their shepherd-service, but not many expose this. I think openssh 
> is the only service to expose it to the system configuration. You 
> could try patching the service you want to use to expose the 
> option to not automatically start it. Which service are you trying 
> to disable?
> 
> There's a discussion to be had about whether shepherd should 
> remember disabled services across a reboot/reconfigure. I don't 
> think it should, because the running services should be considered 
> a part of the system specification.
> 
> Carlo



pgpcM7GYKADb5.pgp
Description: OpenPGP digital signature


Re: Don't auto-start a service in Shepherd

2018-02-24 Thread Carlo Zancanaro

On Fri, Feb 23 2018, Rutger Helling wrote:
Is there a way to prevent auto-starting a service in Shepherd? I 
find that if I use "herd disable service" it still automatically 
starts the service on a reboot/reconfigure.


I've just had a look at gnu/services/shepherd.scm, and it looks 
like system services can set `auto-start?` to #f when creating 
their shepherd-service, but not many expose this. I think openssh 
is the only service to expose it to the system configuration. You 
could try patching the service you want to use to expose the 
option to not automatically start it. Which service are you trying 
to disable?


There's a discussion to be had about whether shepherd should 
remember disabled services across a reboot/reconfigure. I don't 
think it should, because the running services should be considered 
a part of the system specification.


Carlo


signature.asc
Description: PGP signature


Re: Don't auto-start a service in Shepherd

2018-02-24 Thread Chris Marusich
Rutger Helling  writes:

> Hello Guix,
>
> Is there a way to prevent auto-starting a service in Shepherd? I find
> that if I use "herd disable service" it still automatically starts the
> service on a reboot/reconfigure.

I do not know of a way, but perhaps somebody else does.  What is your
use case?  I'm curious to know why you want to disable the service, but
not remove it.

For now, you might be able to accomplish what you want by doing this.
Remove the service from your operating system configuration file, run
"guix system reconfigure", and then reboot into the new system
generation.  Once you're done with whatever you're doing, you can
permanently return to the previous system generation by running "guix
system roll-back", followed by a reboot.  Alternatively, you can
re-introduce the service into your operating system configuration file,
and "roll forward" by running "guix system reconfigure" again.

Hope that helps!

-- 
Chris


signature.asc
Description: PGP signature