unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#42489] [PATCH] services: nix: Provide nix commands.
@ 2020-07-23  9:24 Peng Mei Yu via Guix-patches via
  2020-07-24  6:11 ` [bug#42489] [PATCH] services: nix: Export nix-configuration pengmeiyu
  2020-07-24 15:06 ` [bug#42489] [PATCH] services: nix: Provide nix commands Oleg Pykhalov
  0 siblings, 2 replies; 5+ messages in thread
From: Peng Mei Yu via Guix-patches via @ 2020-07-23  9:24 UTC (permalink / raw)
  To: 42489; +Cc: Peng Mei Yu

* gnu/services/nix.scm (nix-service-type): Extend profile-service-type to
provide nix commands.
---
 gnu/services/nix.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
index 75b2df02dc..e73203c2c5 100644
--- a/gnu/services/nix.scm
+++ b/gnu/services/nix.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019, 2020 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2020 Peng Mei Yu <i@pengmeiyu.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -134,7 +135,9 @@ GID."
    (extensions
     (list (service-extension shepherd-root-service-type nix-shepherd-service)
           (service-extension account-service-type nix-accounts)
-          (service-extension activation-service-type nix-activation)))
+          (service-extension activation-service-type nix-activation)
+          (service-extension profile-service-type
+                             (compose list nix-configuration-package))))
    (description "Run the Nix daemon.")
    (default-value (nix-configuration))))
 
-- 
2.27.0





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

* [bug#42489] [PATCH] services: nix: Export nix-configuration.
  2020-07-23  9:24 [bug#42489] [PATCH] services: nix: Provide nix commands Peng Mei Yu via Guix-patches via
@ 2020-07-24  6:11 ` pengmeiyu
  2020-07-24 15:06 ` [bug#42489] [PATCH] services: nix: Provide nix commands Oleg Pykhalov
  1 sibling, 0 replies; 5+ messages in thread
From: pengmeiyu @ 2020-07-24  6:11 UTC (permalink / raw)
  To: 42489; +Cc: Peng Mei Yu

From: Peng Mei Yu <i@pengmeiyu.com>

* gnu/services/nix.scm (nix-configuration): Export it.
---
 gnu/services/nix.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
index e73203c2c5..5a0a965a69 100644
--- a/gnu/services/nix.scm
+++ b/gnu/services/nix.scm
@@ -35,7 +35,8 @@
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
   #:use-module (guix modules)
-  #:export (nix-service-type))
+  #:export (nix-configuration
+            nix-service-type))
 
 ;;; Commentary:
 ;;;
-- 
2.27.0





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

* [bug#42489] [PATCH] services: nix: Provide nix commands.
  2020-07-23  9:24 [bug#42489] [PATCH] services: nix: Provide nix commands Peng Mei Yu via Guix-patches via
  2020-07-24  6:11 ` [bug#42489] [PATCH] services: nix: Export nix-configuration pengmeiyu
@ 2020-07-24 15:06 ` Oleg Pykhalov
  2020-07-25  8:31   ` Peng Mei Yu
  1 sibling, 1 reply; 5+ messages in thread
From: Oleg Pykhalov @ 2020-07-24 15:06 UTC (permalink / raw)
  To: Peng Mei Yu; +Cc: 42489

[-- Attachment #1: Type: text/plain, Size: 2392 bytes --]

Hi,

Peng Mei Yu <i@pengmeiyu.com> writes:

> * gnu/services/nix.scm (nix-service-type): Extend profile-service-type to
> provide nix commands.
> ---
>  gnu/services/nix.scm | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
> index 75b2df02dc..e73203c2c5 100644
> --- a/gnu/services/nix.scm
> +++ b/gnu/services/nix.scm
> @@ -1,5 +1,6 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2019, 2020 Oleg Pykhalov <go.wigust@gmail.com>
> +;;; Copyright © 2020 Peng Mei Yu <i@pengmeiyu.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -134,7 +135,9 @@ GID."
>     (extensions
>      (list (service-extension shepherd-root-service-type nix-shepherd-service)
>            (service-extension account-service-type nix-accounts)
> -          (service-extension activation-service-type nix-activation)))
> +          (service-extension activation-service-type nix-activation)
> +          (service-extension profile-service-type
> +                             (compose list nix-configuration-package))))
>     (description "Run the Nix daemon.")
>     (default-value (nix-configuration))))

I don't understand what you trying to archive. 


Do you want to run `/gnu/store/…nix…/bin/nix-daemon` with flags, like
‘--debug’?  It's better to add ‘extra-options’ to ‘<nix-configuration>’
record and use it in ‘nix-shepherd-service’.

Also, I found a typo in ‘<nix-configuration>’
‘nix-configuration-extra-options’ should be
‘nix-configuration-extra-config’.

Could you documentat the feature in ‘doc/guix.texi’, please?


> * gnu/services/nix.scm (nix-configuration): Export it.
                                                     ^^^
Just “Export.”.

> ---
>  gnu/services/nix.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
> index e73203c2c5..5a0a965a69 100644
> --- a/gnu/services/nix.scm
> +++ b/gnu/services/nix.scm
> @@ -35,7 +35,8 @@
>    #:use-module (ice-9 match)
>    #:use-module (ice-9 format)
>    #:use-module (guix modules)
> -  #:export (nix-service-type))
> +  #:export (nix-configuration
> +            nix-service-type))

OK, but also export ‘nix-configuration?’.


Thanks,
Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

* [bug#42489] [PATCH] services: nix: Provide nix commands.
  2020-07-24 15:06 ` [bug#42489] [PATCH] services: nix: Provide nix commands Oleg Pykhalov
@ 2020-07-25  8:31   ` Peng Mei Yu
  2020-07-25  9:33     ` bug#42489: " Oleg Pykhalov
  0 siblings, 1 reply; 5+ messages in thread
From: Peng Mei Yu @ 2020-07-25  8:31 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 42489

Hi,

Oleg Pykhalov writes:

>> @@ -134,7 +135,9 @@ GID."
>>     (extensions
>>      (list (service-extension shepherd-root-service-type nix-shepherd-service)
>>            (service-extension account-service-type nix-accounts)
>> -          (service-extension activation-service-type nix-activation)))
>> +          (service-extension activation-service-type nix-activation)
>> +          (service-extension profile-service-type
>> +                             (compose list nix-configuration-package))))
>>     (description "Run the Nix daemon.")
>>     (default-value (nix-configuration))))
>
> I don't understand what you trying to archive.
>
> Do you want to run `/gnu/store/…nix…/bin/nix-daemon` with flags, like
> ‘--debug’?  It's better to add ‘extra-options’ to ‘<nix-configuration>’
> record and use it in ‘nix-shepherd-service’.

No.  The nix-service is useless without commands like nix, nix-env,
nix-shell, etc.  I think it's a standard that a guix service should
provide necessary commands in order to use that service.

>> @@ -35,7 +35,8 @@
>>    #:use-module (ice-9 match)
>>    #:use-module (ice-9 format)
>>    #:use-module (guix modules)
>> -  #:export (nix-service-type))
>> +  #:export (nix-configuration
>> +            nix-service-type))
>
> OK, but also export ‘nix-configuration?’.

That's fine.  All I want is to be able to customize the
"extra-config".

Thanks.




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

* bug#42489: [PATCH] services: nix: Provide nix commands.
  2020-07-25  8:31   ` Peng Mei Yu
@ 2020-07-25  9:33     ` Oleg Pykhalov
  0 siblings, 0 replies; 5+ messages in thread
From: Oleg Pykhalov @ 2020-07-25  9:33 UTC (permalink / raw)
  To: Peng Mei Yu; +Cc: 42489-done

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

Peng Mei Yu <pengmeiyu@riseup.net> writes:

>> @@ -134,7 +135,9 @@ GID."
>>     (extensions
>>      (list (service-extension shepherd-root-service-type nix-shepherd-service)
>>            (service-extension account-service-type nix-accounts)
>> -          (service-extension activation-service-type nix-activation)))
>> +          (service-extension activation-service-type nix-activation)
>> +          (service-extension profile-service-type
>> +                             (compose list nix-configuration-package))))
>>     (description "Run the Nix daemon.")
>>     (default-value (nix-configuration))))
>
> The nix-service is useless without commands like nix, nix-env,
> nix-shell, etc.  I think it's a standard that a guix service should
> provide necessary commands in order to use that service.

Ah, good catch!  Pushed your changes to master.

Thanks again,
Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

end of thread, other threads:[~2020-07-25  9:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-23  9:24 [bug#42489] [PATCH] services: nix: Provide nix commands Peng Mei Yu via Guix-patches via
2020-07-24  6:11 ` [bug#42489] [PATCH] services: nix: Export nix-configuration pengmeiyu
2020-07-24 15:06 ` [bug#42489] [PATCH] services: nix: Provide nix commands Oleg Pykhalov
2020-07-25  8:31   ` Peng Mei Yu
2020-07-25  9:33     ` bug#42489: " Oleg Pykhalov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).