aboutsummaryrefslogtreecommitdiff
path: root/gnu/system/file-systems.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2017-03-22 12:57:37 +0200
committerEfraim Flashner <efraim@flashner.co.il>2017-03-22 12:57:37 +0200
commit378de69c59ee0700c67b10b38592c213821b41f2 (patch)
treeee9b6465430077a79cace3cb8fab1a85a8c1e4c5 /gnu/system/file-systems.scm
parent049e02eaa258942515260a58c8d9ddfc4e7caffe (diff)
parentd8be338f16c7da4acfa55f29f58beaf908d3ad60 (diff)
downloadgnu-guix-378de69c59ee0700c67b10b38592c213821b41f2.tar
gnu-guix-378de69c59ee0700c67b10b38592c213821b41f2.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/system/file-systems.scm')
-rw-r--r--gnu/system/file-systems.scm29
1 files changed, 7 insertions, 22 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 8107722c74..bbac23fbdf 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -22,8 +22,6 @@
#:use-module (guix records)
#:use-module ((gnu build file-systems)
#:select (string->uuid uuid->string))
- #:use-module (gnu packages linux)
- #:use-module (gnu packages disk)
#:re-export (string->uuid
uuid->string)
#:export (<file-system>
@@ -41,6 +39,8 @@
file-system-create-mount-point?
file-system-dependencies
+ file-system-type-predicate
+
file-system->spec
spec->file-system
specification->file-system-mapping
@@ -67,8 +67,6 @@
file-system-mapping->bind-mount
- file-system-packages
-
%store-mapping
%network-configuration-files
%network-file-mappings))
@@ -77,6 +75,9 @@
;;;
;;; Declaring file systems to be mounted.
;;;
+;;; Note: this file system is used both in the Shepherd and on the "host
+;;; side", so it must not include (gnu packages …) modules.
+;;;
;;; Code:
;; File system declaration.
@@ -416,25 +417,9 @@ a bind mount."
%network-configuration-files))
(define (file-system-type-predicate type)
+ "Return a predicate that, when passed a file system, returns #t if that file
+system has the given TYPE."
(lambda (fs)
(string=? (file-system-type fs) type)))
-(define* (file-system-packages file-systems #:key (volatile-root? #f))
- `(,@(if (find (lambda (fs)
- (string-prefix? "ext" (file-system-type fs)))
- file-systems)
- (list e2fsck/static)
- '())
- ,@(if (find (lambda (fs)
- (string-suffix? "fat" (file-system-type fs)))
- file-systems)
- (list fatfsck/static)
- '())
- ,@(if (find (file-system-type-predicate "btrfs") file-systems)
- (list btrfs-progs/static)
- '())
- ,@(if volatile-root?
- (list unionfs-fuse/static)
- '())))
-
;;; file-systems.scm ends here