From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:43101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hX48K-0003kR-2g for guix-patches@gnu.org; Sat, 01 Jun 2019 09:33:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hX42I-0004Tv-Cz for guix-patches@gnu.org; Sat, 01 Jun 2019 09:27:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52231) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hX42I-0004Tr-9q for guix-patches@gnu.org; Sat, 01 Jun 2019 09:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hX42I-0008Ib-5B for guix-patches@gnu.org; Sat, 01 Jun 2019 09:27:02 -0400 Subject: [bug#35648] [PATCH] services: Add 'nix-service-type'. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20190509122951.9119-1-go.wigust@gmail.com> Date: Sat, 01 Jun 2019 15:26:13 +0200 In-Reply-To: <20190509122951.9119-1-go.wigust@gmail.com> (Oleg Pykhalov's message of "Thu, 9 May 2019 15:29:51 +0300") Message-ID: <87woi5e8sq.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Oleg Pykhalov Cc: 35648@debbugs.gnu.org Hi Oleg, Oleg Pykhalov skribis: > * gnu/services/nix.scm: New file. > * gnu/local.mk: Add this. > * doc/guix.texi (Miscellaneous Services): Document this. [...] > +@defvr {Scheme Variable} nix-service-type > + > +This is the type of the service that runs @url{https://nixos.org/nix/, N= ix}, a > +daemon that is required to use the Nix package manager. =E2=80=9C=E2=80=A6 that runs the build daemon of the @url{https://nixos.org= /nix, Nix} package manager. Here is an example showing how to use it:=E2=80=9D > +@example > +(use-modules (gnu)) > +(use-service-modules nix) > +(use-package-modules package-management) > + > +(operating-system Add a line like: ;; @dots{} > + (packages (append (list nix) > + %base-packages)) > + > + (services (append (list (service nix-service-type)) > + %base-services))) > +@end example > + > +After @command{guix system reconfigure} you need to configure Nix for yo= ur > +user, e.g.: > + > +@example > +$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable > +$ nix-channel --update > +$ ln -s "/nix/var/nix/profiles/per-user/$USER/profile" ~/.nix-profile > +$ source /run/current-system/profile/etc/profile.d/nix.sh > +$ nix-env --install hello > +$ hello > +@end example Can we instead simply add a link to upstream documentation for this? I would feel more comfortable that way. Otherwise LGTM, thanks! Ludo=E2=80=99.