diff options
Diffstat (limited to 'gnu/system/mapped-devices.scm')
| -rw-r--r-- | gnu/system/mapped-devices.scm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm index d0a9f0288f8..1cfd6492787 100644 --- a/gnu/system/mapped-devices.scm +++ b/gnu/system/mapped-devices.scm | |||
| @@ -81,14 +81,7 @@ | |||
| 81 | (documentation "Map a device node using Linux's device mapper.") | 81 | (documentation "Map a device node using Linux's device mapper.") |
| 82 | (start #~(lambda () #$(open source target))) | 82 | (start #~(lambda () #$(open source target))) |
| 83 | (stop #~(lambda _ (not #$(close source target)))) | 83 | (stop #~(lambda _ (not #$(close source target)))) |
| 84 | (respawn? #f) | 84 | (respawn? #f)))))) |
| 85 | |||
| 86 | ;; Add the modules needed by LUKS-DEVICE-MAPPING. | ||
| 87 | ;; FIXME: This info should be propagated via gexps. | ||
| 88 | (modules `((rnrs bytevectors) ;bytevector? | ||
| 89 | ((gnu build file-systems) | ||
| 90 | #:select (find-partition-by-luks-uuid)) | ||
| 91 | ,@%default-modules))))))) | ||
| 92 | 85 | ||
| 93 | (define (device-mapping-service mapped-device) | 86 | (define (device-mapping-service mapped-device) |
| 94 | "Return a service that sets up @var{mapped-device}." | 87 | "Return a service that sets up @var{mapped-device}." |
| @@ -105,6 +98,11 @@ | |||
| 105 | (with-imported-modules '((gnu build file-systems) | 98 | (with-imported-modules '((gnu build file-systems) |
| 106 | (guix build bournish)) | 99 | (guix build bournish)) |
| 107 | #~(let ((source #$source)) | 100 | #~(let ((source #$source)) |
| 101 | ;; XXX: 'use-modules' should be at the top level. | ||
| 102 | (use-modules (rnrs bytevectors) ;bytevector? | ||
| 103 | ((gnu build file-systems) | ||
| 104 | #:select (find-partition-by-luks-uuid))) | ||
| 105 | |||
| 108 | (zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup") | 106 | (zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup") |
| 109 | "open" "--type" "luks" | 107 | "open" "--type" "luks" |
| 110 | 108 | ||
