unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* overriding essential-services
@ 2017-08-11 20:26 Ricardo Wurmus
  2017-08-12 16:17 ` Alex Kost
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2017-08-11 20:26 UTC (permalink / raw)
  To: help-guix

Hi Guix,

I want to make sure that /etc/environment includes GUILE_LOAD_PATH and
GUILE_LOAD_COMPILED_PATH, because that’s needed for offloading.
“/etc/environment” is created by the “session-environment-service”
service, which is part of “essential-services”.  It is not part of
%base-services, so I cannot catch it with “modify-services” and extend
it.

How would I go about extending it?

For now I’ll use ~/.ssh/environment and “PermitUserEnvironment=yes”, but
I think it would anyway be good to have a mechanism to easily change the
contents of /etc/environment.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: overriding essential-services
  2017-08-11 20:26 overriding essential-services Ricardo Wurmus
@ 2017-08-12 16:17 ` Alex Kost
  2017-08-15 20:05   ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Kost @ 2017-08-12 16:17 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Ricardo Wurmus (2017-08-11 22:26 +0200) wrote:

> Hi Guix,
>
> I want to make sure that /etc/environment includes GUILE_LOAD_PATH and
> GUILE_LOAD_COMPILED_PATH, because that’s needed for offloading.
> “/etc/environment” is created by the “session-environment-service”
> service, which is part of “essential-services”.  It is not part of
> %base-services, so I cannot catch it with “modify-services” and extend
> it.
>
> How would I go about extending it?

There is probably no convenient way now.

> For now I’ll use ~/.ssh/environment and “PermitUserEnvironment=yes”, but
> I think it would anyway be good to have a mechanism to easily change the
> contents of /etc/environment.

IFIUC the intention of <https://bugs.gnu.org/27155> is to provide the
extension facility for any service.

-- 
Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: overriding essential-services
  2017-08-12 16:17 ` Alex Kost
@ 2017-08-15 20:05   ` Ricardo Wurmus
  2017-08-19 18:41     ` Alex Kost
  2017-08-22  9:46     ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Wurmus @ 2017-08-15 20:05 UTC (permalink / raw)
  To: Alex Kost; +Cc: help-guix


Alex Kost <alezost@gmail.com> writes:

> Ricardo Wurmus (2017-08-11 22:26 +0200) wrote:
>
>> Hi Guix,
>>
>> I want to make sure that /etc/environment includes GUILE_LOAD_PATH and
>> GUILE_LOAD_COMPILED_PATH, because that’s needed for offloading.
>> “/etc/environment” is created by the “session-environment-service”
>> service, which is part of “essential-services”.  It is not part of
>> %base-services, so I cannot catch it with “modify-services” and extend
>> it.
>>
>> How would I go about extending it?
>
> There is probably no convenient way now.
>
>> For now I’ll use ~/.ssh/environment and “PermitUserEnvironment=yes”, but
>> I think it would anyway be good to have a mechanism to easily change the
>> contents of /etc/environment.
>
> IFIUC the intention of <https://bugs.gnu.org/27155> is to provide the
> extension facility for any service.

I don’t know… I never quite warmed up to the implementation.  It looks
much too powerful for something as simple as e.g. overwriting
/etc/environment.

Maybe “session-environment-service-type” is an outlier here anyway.  I
see the utility of 27155 for the other services, but using it for
“session-environment-service-type” really seems wrong.  Maybe we can
move it to %base-services?

And maybe we could avoid essential-services altogether and make these
services explicit, so that they can be modified with “modify-services”.
Right now they are special in that they are always added to whatever
services the user defines.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: overriding essential-services
  2017-08-15 20:05   ` Ricardo Wurmus
@ 2017-08-19 18:41     ` Alex Kost
  2017-08-22  9:46     ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Alex Kost @ 2017-08-19 18:41 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Ricardo Wurmus (2017-08-15 22:05 +0200) wrote:

> Alex Kost <alezost@gmail.com> writes:
>
>> Ricardo Wurmus (2017-08-11 22:26 +0200) wrote:
>>
>>> Hi Guix,
>>>
>>> I want to make sure that /etc/environment includes GUILE_LOAD_PATH and
>>> GUILE_LOAD_COMPILED_PATH, because that’s needed for offloading.
>>> “/etc/environment” is created by the “session-environment-service”
>>> service, which is part of “essential-services”.  It is not part of
>>> %base-services, so I cannot catch it with “modify-services” and extend
>>> it.
>>>
>>> How would I go about extending it?
>>
>> There is probably no convenient way now.
>>
>>> For now I’ll use ~/.ssh/environment and “PermitUserEnvironment=yes”, but
>>> I think it would anyway be good to have a mechanism to easily change the
>>> contents of /etc/environment.
>>
>> IFIUC the intention of <https://bugs.gnu.org/27155> is to provide the
>> extension facility for any service.
>
> I don’t know… I never quite warmed up to the implementation.  It looks
> much too powerful for something as simple as e.g. overwriting
> /etc/environment.
>
> Maybe “session-environment-service-type” is an outlier here anyway.  I
> see the utility of 27155 for the other services, but using it for
> “session-environment-service-type” really seems wrong.  Maybe we can
> move it to %base-services?
>
> And maybe we could avoid essential-services altogether and make these
> services explicit, so that they can be modified with “modify-services”.
> Right now they are special in that they are always added to whatever
> services the user defines.

I agree!  I always vote for providing users a freedom to shoot
themselves in their feet.  The more ways to customize various aspects of
a system there are, the better.  So I think that moving as much services
as possible (from essential-services to base-services) would be great.

-- 
Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: overriding essential-services
  2017-08-15 20:05   ` Ricardo Wurmus
  2017-08-19 18:41     ` Alex Kost
@ 2017-08-22  9:46     ` Ludovic Courtès
  1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2017-08-22  9:46 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Alex Kost, help-guix

Ricardo Wurmus <rekado@elephly.net> skribis:

> Alex Kost <alezost@gmail.com> writes:
>
>> Ricardo Wurmus (2017-08-11 22:26 +0200) wrote:
>>
>>> Hi Guix,
>>>
>>> I want to make sure that /etc/environment includes GUILE_LOAD_PATH and
>>> GUILE_LOAD_COMPILED_PATH, because that’s needed for offloading.
>>> “/etc/environment” is created by the “session-environment-service”
>>> service, which is part of “essential-services”.  It is not part of
>>> %base-services, so I cannot catch it with “modify-services” and extend
>>> it.
>>>
>>> How would I go about extending it?
>>
>> There is probably no convenient way now.

What about:

  (services (cons (simple-service 'my-env
                                  session-environment-service-type
                                  `(("GUILE_LOAD_PATH"
                                     . ,(file-append guile-2.2 "/share/foo"))))
                  %base-services))

It seems to do the job.

> And maybe we could avoid essential-services altogether and make these
> services explicit, so that they can be modified with “modify-services”.
> Right now they are special in that they are always added to whatever
> services the user defines.

I don’t like ‘essential-services’ either, but I like that we have a
high-level ‘operating-system’ structure (in theory we could have just
one big ‘service’ structure and that’d be enough, but it’d be less
pleasant to work with.)  Not sure how to address this.

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-22  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-11 20:26 overriding essential-services Ricardo Wurmus
2017-08-12 16:17 ` Alex Kost
2017-08-15 20:05   ` Ricardo Wurmus
2017-08-19 18:41     ` Alex Kost
2017-08-22  9:46     ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).