me
/
guix
Archived
1
0
Fork 0

machine: ssh: Do not import the host (guix config), really.

This is a followup to 70ffa8af1e, which
did not really solve the problem.

* gnu/machine/ssh.scm (not-config?): New procedure.
(machine-boot-parameters): Use it as an argument to
'source-module-closure'.
master
Ludovic Courtès 2021-01-04 11:29:17 +01:00
parent 9158020d78
commit 61d8bd56a4
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 13 additions and 4 deletions

View File

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org> ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org>
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -346,6 +346,14 @@ by MACHINE."
;;; System deployment. ;;; System deployment.
;;; ;;;
(define not-config?
;; Select (guix …) and (gnu …) modules, except (guix config).
(match-lambda
(('guix 'config) #f)
(('guix _ ...) #t)
(('gnu _ ...) #t)
(_ #f)))
(define (machine-boot-parameters machine) (define (machine-boot-parameters machine)
"Monadic procedure returning a list of 'boot-parameters' for the generations "Monadic procedure returning a list of 'boot-parameters' for the generations
of MACHINE's system profile, ordered from most recent to oldest." of MACHINE's system profile, ordered from most recent to oldest."
@ -354,9 +362,10 @@ of MACHINE's system profile, ordered from most recent to oldest."
(define remote-exp (define remote-exp
(with-extensions (list guile-gcrypt) (with-extensions (list guile-gcrypt)
(with-imported-modules (source-module-closure (with-imported-modules `(((guix config) => ,(make-config.scm))
`(((guix config) => ,(make-config.scm)) ,@(source-module-closure
(guix profiles))) '((guix profiles))
#:select? not-config?))
#~(begin #~(begin
(use-modules (guix config) (use-modules (guix config)
(guix profiles) (guix profiles)