From 47b9614b3110307093382363c0ba70d31f32ef59 Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Thu, 9 May 2019 15:13:26 +0300 Subject: services: Add 'nix-service-type'. * gnu/services/nix.scm: New file. * gnu/local.mk: Add this. * doc/guix.texi (Miscellaneous Services): Document this. --- doc/guix.texi | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index a9cd66ce87..83981b50d2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -24197,6 +24197,47 @@ setuid-root (@pxref{Setuid Programs}) such that unprivileged users can invoke @command{singularity run} and similar commands. @end defvr +@cindex Nix +@subsubheading Nix service + +The @code{(gnu services nix)} module provides the following service. + +@defvr {Scheme Variable} nix-service-type + +This is the type of the service that runs build daemon of the +@url{https://nixos.org/nix/, Nix} package manager. Here is an example showing +how to use it: + +@example +(use-modules (gnu)) +(use-service-modules nix) +(use-package-modules package-management) + +(operating-system + ;; @dots{} + (packages (append (list nix) + %base-packages)) + + (services (append (list (service nix-service-type)) + %base-services))) +@end example + +After @command{guix system reconfigure} configure Nix for your user: + +@itemize +@item Add a Nix channel and update it. See @url{https://nixos.org/nix/manual/, +Nix Package Manager Guide}. + +@item Create a symlink to your profile and activate Nix profile: +@end itemize + +@example +$ ln -s "/nix/var/nix/profiles/per-user/$USER/profile" ~/.nix-profile +$ source /run/current-system/profile/etc/profile.d/nix.sh +@end example + +@end defvr + @node Setuid Programs @section Setuid Programs -- cgit v1.2.3