diff options
author | Oleg Pykhalov <go.wigust@gmail.com> | 2020-07-25 11:51:49 +0300 |
---|---|---|
committer | Oleg Pykhalov <go.wigust@gmail.com> | 2020-07-25 12:27:35 +0300 |
commit | 64c6282e7fc69ff58e7257a7e72284f63f2f5956 (patch) | |
tree | e8918c4efbca1b2d6d7965be3940e14fc0cb8fe5 /gnu/services/nix.scm | |
parent | 3601d802d55106e36e3279680d4728dd3cfe3b4c (diff) | |
download | guix-64c6282e7fc69ff58e7257a7e72284f63f2f5956.tar.gz |
services: nix: Add extra-options.
* gnu/services/nix.scm (<nix-configuration>)[extra-options]: New field. (nix-shepherd-service): Add this. (nix-activation): Add new line to the end of /etc/nix/nix.conf file. * doc/guix.texi (Miscellaneous Services)[Nix service]: Document this.
Diffstat (limited to 'gnu/services/nix.scm')
-rw-r--r-- | gnu/services/nix.scm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm index ba94cfa721..93f46ef71e 100644 --- a/gnu/services/nix.scm +++ b/gnu/services/nix.scm @@ -56,6 +56,8 @@ (build-sandbox-items nix-configuration-build-sandbox-items ;list of strings (default '())) (extra-config nix-configuration-extra-config ;list of strings + (default '())) + (extra-options nix-configuration-extra-options ;list of strings (default '()))) ;; Copied from gnu/services/base.scm @@ -116,19 +118,21 @@ GID." '#$(map references-file (list package))) '#$build-sandbox-items)) - (for-each (cut display <>) '#$extra-config)))))))) + (for-each (cut display <>) '#$extra-config) + (newline)))))))) (define nix-shepherd-service ;; Return a <shepherd-service> for Nix. (match-lambda - (($ <nix-configuration> package _ ...) + (($ <nix-configuration> package _ _ _ extra-options) (list (shepherd-service (provision '(nix-daemon)) (documentation "Run nix-daemon.") (requirement '()) (start #~(make-forkexec-constructor - (list (string-append #$package "/bin/nix-daemon")))) + (list (string-append #$package "/bin/nix-daemon") + #$@extra-options))) (respawn? #f) (stop #~(make-kill-destructor))))))) |