diff options
author | Oleg Pykhalov <go.wigust@gmail.com> | 2019-05-09 15:13:26 +0300 |
---|---|---|
committer | Oleg Pykhalov <go.wigust@gmail.com> | 2019-06-10 09:15:45 +0300 |
commit | 47b9614b3110307093382363c0ba70d31f32ef59 (patch) | |
tree | 730ea79a7b34295a42650748e722a5e5b1f054d0 /doc/guix.texi | |
parent | 31775e400e05fb05fff0de4d3ffbf9549fe20994 (diff) |
services: Add 'nix-service-type'.
* gnu/services/nix.scm: New file.
* gnu/local.mk: Add this.
* doc/guix.texi (Miscellaneous Services): Document this.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 41 |
1 files changed, 41 insertions, 0 deletions
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 |