[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
10/10: services: guix-service: Remove extraneous monadism.
From: |
Ludovic Courtès |
Subject: |
10/10: services: guix-service: Remove extraneous monadism. |
Date: |
Tue, 17 Mar 2015 21:29:01 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 5250a4f215de414f516850e48af2f91c9c17c066
Author: Ludovic Courtès <address@hidden>
Date: Tue Mar 17 22:25:03 2015 +0100
services: guix-service: Remove extraneous monadism.
* gnu/services/base.scm (guix-build-accounts): Remove unneeded
'with-monad'.
(guix-service): Adjust accordingly.
---
gnu/services/base.scm | 43 +++++++++++++++++++++----------------------
1 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 40d4740..84bac94 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -568,25 +568,24 @@ given @var{config}---an @code{<nscd-configuration>}
object. Optionally,
(shadow shadow))
"Return a list of COUNT user accounts for Guix build users, with UIDs
starting at FIRST-UID, and under GID."
- (with-monad %store-monad
- (return (unfold (cut > <> count)
- (lambda (n)
- (user-account
- (name (format #f "guixbuilder~2,'0d" n))
- (system? #t)
- (uid (+ first-uid n -1))
- (group group)
-
- ;; guix-daemon expects GROUP to be listed as a
- ;; supplementary group too:
- ;;
<http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00239.html>.
- (supplementary-groups (list group "kvm"))
-
- (comment (format #f "Guix Build User ~2d" n))
- (home-directory "/var/empty")
- (shell #~(string-append #$shadow "/sbin/nologin"))))
- 1+
- 1))))
+ (unfold (cut > <> count)
+ (lambda (n)
+ (user-account
+ (name (format #f "guixbuilder~2,'0d" n))
+ (system? #t)
+ (uid (+ first-uid n -1))
+ (group group)
+
+ ;; guix-daemon expects GROUP to be listed as a
+ ;; supplementary group too:
+ ;;
<http://lists.gnu.org/archive/html/bug-guix/2013-01/msg00239.html>.
+ (supplementary-groups (list group "kvm"))
+
+ (comment (format #f "Guix Build User ~2d" n))
+ (home-directory "/var/empty")
+ (shell #~(string-append #$shadow "/sbin/nologin"))))
+ 1+
+ 1))
(define (hydra-key-authorization guix)
"Return a gexp with code to register the hydra.gnu.org public key with
@@ -636,8 +635,7 @@ passed to @command{guix-daemon}."
(and authorize-hydra-key?
(hydra-key-authorization guix)))
- (mlet %store-monad ((accounts (guix-build-accounts build-accounts
- #:group builder-group)))
+ (with-monad %store-monad
(return (service
(provision '(guix-daemon))
(requirement '(user-processes))
@@ -650,7 +648,8 @@ passed to @command{guix-daemon}."
'("--no-substitutes"))
address@hidden)))
(stop #~(make-kill-destructor))
- (user-accounts accounts)
+ (user-accounts (guix-build-accounts build-accounts
+ #:group builder-group))
(user-groups (list (user-group
(name builder-group)
(system? #t)
- branch master updated (708155d -> 5250a4f), Ludovic Courtès, 2015/03/17
- 01/10: tests: Add an indirection for white-box testing., Ludovic Courtès, 2015/03/17
- 04/10: gexp: Export 'gexp-input' constructor., Ludovic Courtès, 2015/03/17
- 05/10: profiles: Use 'gexp-input' instead of two-element lists., Ludovic Courtès, 2015/03/17
- 06/10: gexp: Remove special meaning of forms (PACKAGE OUTPUT) in ungexp., Ludovic Courtès, 2015/03/17
- 08/10: packages: Move grafting parameter to (guix derivations)., Ludovic Courtès, 2015/03/17
- 07/10: gexp: Separate "compilers" for origins and packages from the core., Ludovic Courtès, 2015/03/17
- 10/10: services: guix-service: Remove extraneous monadism.,
Ludovic Courtès <=
- 09/10: gexp: Move the package and origin compilers to (guix packages)., Ludovic Courtès, 2015/03/17
- 02/10: gexp: Rename <output-ref> to <gexp-output>., Ludovic Courtès, 2015/03/17
- 03/10: gexp: Add <gexp-input>., Ludovic Courtès, 2015/03/17