diff options
author | Mark H Weaver <mhw@netris.org> | 2017-03-19 18:52:01 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2017-03-19 18:52:12 -0400 |
commit | f67337e23ec16b1e05fcdcc7953f68f13ed6770a (patch) | |
tree | 766e98a6c4695228f0a066accf91f639791dad68 /gnu/system/file-systems.scm | |
parent | b99eec83b861f6bee7afb7bd6ffcbdddd8f62b65 (diff) | |
parent | e05fc441cd5528ba6c83b6371c27c1e87dd393e9 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/system/file-systems.scm')
-rw-r--r-- | gnu/system/file-systems.scm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index 7011a279d3..8107722c74 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -22,6 +22,8 @@ #: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> @@ -65,6 +67,8 @@ file-system-mapping->bind-mount + file-system-packages + %store-mapping %network-configuration-files %network-file-mappings)) @@ -411,4 +415,26 @@ a bind mount." (writable? (string=? file "/etc/resolv.conf")))) %network-configuration-files)) +(define (file-system-type-predicate 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 |