summary refs log tree commit diff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-04-17 17:59:58 +0200
committerLudovic Courtès <ludo@gnu.org>2016-04-18 01:24:06 +0200
commit374f14c265224048b065f2c177f80718b905201b (patch)
treeacf70c717b4b7404e9c815e7717b67465b316031 /gnu/system.scm
parent060d62a740fc1932a3be505534feff099b59ac9f (diff)
downloadguix-374f14c265224048b065f2c177f80718b905201b.tar.gz
system: Move 'luks-device-mapping' to (gnu system mapped-devices).
* gnu/system.scm (open-luks-device, close-luks-device)
(luks-device-mapping): Move to...
* gnu/system/mapped-devices.scm: ... here.  New file.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm23
1 files changed, 1 insertions, 22 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index a52881180d..b1454b262d 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -43,7 +43,6 @@
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages firmware)
-  #:autoload   (gnu packages cryptsetup) (cryptsetup)
   #:use-module (gnu services)
   #:use-module (gnu services shepherd)
   #:use-module (gnu services base)
@@ -102,9 +101,7 @@
             local-host-aliases
             %setuid-programs
             %base-packages
-            %base-firmware
-
-            luks-device-mapping))
+            %base-firmware))
 
 ;;; Commentary:
 ;;;
@@ -177,24 +174,6 @@
 ;;; Services.
 ;;;
 
-(define (open-luks-device source target)
-  "Return a gexp that maps SOURCE to TARGET as a LUKS device, using
-'cryptsetup'."
-  #~(zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup")
-                    "open" "--type" "luks"
-                    #$source #$target)))
-
-(define (close-luks-device source target)
-  "Return a gexp that closes TARGET, a LUKS device."
-  #~(zero? (system* (string-append #$cryptsetup "/sbin/cryptsetup")
-                    "close" #$target)))
-
-(define luks-device-mapping
-  ;; The type of LUKS mapped devices.
-  (mapped-device-kind
-   (open open-luks-device)
-   (close close-luks-device)))
-
 (define (other-file-system-services os)
   "Return file system services for the file systems of OS that are not marked
 as 'needed-for-boot'."