+ " (beta)"))
+
+(define (store-file-system file-systems)
+ "Return the file system object among FILE-SYSTEMS that contains the store."
+ (match (filter (lambda (fs)
+ (and (file-system-mount? fs)
+ (not (memq 'bind-mount (file-system-flags fs)))
+ (string-prefix? (file-system-mount-point fs)
+ (%store-prefix))))
+ file-systems)
+ ((and candidates (head . tail))
+ (reduce (lambda (fs1 fs2)
+ (if (> (string-length (file-system-mount-point fs1))
+ (string-length (file-system-mount-point fs2)))
+ fs1
+ fs2))
+ head
+ candidates))))
+
+(define (operating-system-store-file-system os)
+ "Return the file system that contains the store of OS."
+ (store-file-system (operating-system-file-systems os)))