summaryrefslogtreecommitdiff
path: root/gnu/image.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/image.scm')
-rw-r--r--gnu/image.scm22
1 files changed, 19 insertions, 3 deletions
diff --git a/gnu/image.scm b/gnu/image.scm
index 75d489490d..0b3a5a096b 100644
--- a/gnu/image.scm
+++ b/gnu/image.scm
@@ -17,6 +17,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu image)
+ #:use-module (gnu platform)
#:use-module (guix records)
#:export (partition
partition?
@@ -34,12 +35,15 @@
image?
image-name
image-format
- image-target
+ image-platform
image-size
image-operating-system
+ image-partition-table-type
image-partitions
image-compression?
image-volatile-root?
+ image-shared-store?
+ image-shared-network?
image-substitutable?
image-type
@@ -47,7 +51,8 @@
image-type-name
image-type-constructor
- os->image))
+ os->image
+ os+platform->image))
;;;
@@ -78,18 +83,24 @@
(name image-name ;symbol
(default #f))
(format image-format) ;symbol
- (target image-target
+ (platform image-platform ;<platform>
(default #f))
(size image-size ;size in bytes as integer
(default 'guess))
(operating-system image-operating-system ;<operating-system>
(default #f))
+ (partition-table-type image-partition-table-type ; 'mbr or 'gpt
+ (default 'mbr))
(partitions image-partitions ;list of <partition>
(default '()))
(compression? image-compression? ;boolean
(default #t))
(volatile-root? image-volatile-root? ;boolean
(default #t))
+ (shared-store? image-shared-store? ;boolean
+ (default #f))
+ (shared-network? image-shared-network? ;boolean
+ (default #f))
(substitutable? image-substitutable? ;boolean
(default #t)))
@@ -112,3 +123,8 @@
(define* (os->image os #:key type)
(let ((constructor (image-type-constructor type)))
(constructor os)))
+
+(define* (os+platform->image os platform #:key type)
+ (image
+ (inherit (os->image os #:type type))
+ (platform platform)))