mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
system: pam: Use 'computed-file' instead of 'gexp->derivation'.
* gnu/system/linux.scm (pam-service->configuration): Use 'computed-file' instead of 'gexp->derivation'. (pam-services->directory): Likewise. * gnu/system.scm (etc-directory): Adjust accordingly.
This commit is contained in:
parent
e1c153e0ab
commit
23afe939a2
2 changed files with 5 additions and 12 deletions
|
@ -447,7 +447,7 @@ (define* (etc-directory #:key
|
|||
(sudoers-file (plain-file "sudoers" "")))
|
||||
"Return a derivation that builds the static part of the /etc directory."
|
||||
(mlet* %store-monad
|
||||
((pam.d (pam-services->directory pam-services))
|
||||
((pam.d -> (pam-services->directory pam-services))
|
||||
(login.defs (text-file "login.defs" "# Empty for now.\n"))
|
||||
(shells (shells-file shells))
|
||||
(emacs (emacs-site-directory))
|
||||
|
|
|
@ -17,10 +17,8 @@
|
|||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu system linux)
|
||||
#:use-module (guix store)
|
||||
#:use-module (guix records)
|
||||
#:use-module (guix derivations)
|
||||
#:use-module (guix monads)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (srfi srfi-1)
|
||||
|
@ -86,18 +84,13 @@ (define builder
|
|||
(map (cut entry->gexp "session" <>) session))
|
||||
#t))))
|
||||
|
||||
(gexp->derivation name builder))))
|
||||
(computed-file name builder))))
|
||||
|
||||
(define (pam-services->directory services)
|
||||
"Return the derivation to build the configuration directory to be used as
|
||||
/etc/pam.d for SERVICES."
|
||||
(mlet %store-monad
|
||||
((names -> (map pam-service-name services))
|
||||
(files (sequence %store-monad
|
||||
(map pam-service->configuration
|
||||
;; XXX: Eventually, SERVICES may be a list of
|
||||
;; monadic values instead of plain values.
|
||||
services))))
|
||||
(let ((names (map pam-service-name services))
|
||||
(files (map pam-service->configuration services)))
|
||||
(define builder
|
||||
#~(begin
|
||||
(use-modules (ice-9 match)
|
||||
|
@ -114,7 +107,7 @@ (define builder
|
|||
;; instead. See <http://bugs.gnu.org/20037>.
|
||||
(delete-duplicates '#$(zip names files)))))
|
||||
|
||||
(gexp->derivation "pam.d" builder)))
|
||||
(computed-file "pam.d" builder)))
|
||||
|
||||
(define %pam-other-services
|
||||
;; The "other" PAM configuration, which denies everything (see
|
||||
|
|
Loading…
Reference in a new issue