diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2021-01-04 11:29:17 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2021-01-04 11:51:48 +0100 |
| commit | 61d8bd56a4644a72b964b680456da4332eb1ef6d (patch) | |
| tree | e37345f74844f9f008b2c8eb7640285865b4e855 /gnu/machine | |
| parent | 9158020d7853b6e7925802e0d0a082801c680e8f (diff) | |
machine: ssh: Do not import the host (guix config), really.
This is a followup to 70ffa8af1e93ab8a92c4622745e9cb4a2782f3c8, 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'.
Diffstat (limited to 'gnu/machine')
| -rw-r--r-- | gnu/machine/ssh.scm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 08c653ba179..997d673e756 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org> | 2 | ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.org> |
| 3 | ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org> | 3 | ;;; Copyright © 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; | 4 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| 6 | ;;; | 6 | ;;; |
| @@ -346,6 +346,14 @@ by MACHINE." | |||
| 346 | ;;; System deployment. | 346 | ;;; System deployment. |
| 347 | ;;; | 347 | ;;; |
| 348 | 348 | ||
| 349 | (define not-config? | ||
| 350 | ;; Select (guix …) and (gnu …) modules, except (guix config). | ||
| 351 | (match-lambda | ||
| 352 | (('guix 'config) #f) | ||
| 353 | (('guix _ ...) #t) | ||
| 354 | (('gnu _ ...) #t) | ||
| 355 | (_ #f))) | ||
| 356 | |||
| 349 | (define (machine-boot-parameters machine) | 357 | (define (machine-boot-parameters machine) |
| 350 | "Monadic procedure returning a list of 'boot-parameters' for the generations | 358 | "Monadic procedure returning a list of 'boot-parameters' for the generations |
| 351 | of MACHINE's system profile, ordered from most recent to oldest." | 359 | 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." | |||
| 354 | 362 | ||
| 355 | (define remote-exp | 363 | (define remote-exp |
| 356 | (with-extensions (list guile-gcrypt) | 364 | (with-extensions (list guile-gcrypt) |
| 357 | (with-imported-modules (source-module-closure | 365 | (with-imported-modules `(((guix config) => ,(make-config.scm)) |
| 358 | `(((guix config) => ,(make-config.scm)) | 366 | ,@(source-module-closure |
| 359 | (guix profiles))) | 367 | '((guix profiles)) |
| 368 | #:select? not-config?)) | ||
| 360 | #~(begin | 369 | #~(begin |
| 361 | (use-modules (guix config) | 370 | (use-modules (guix config) |
| 362 | (guix profiles) | 371 | (guix profiles) |
