Add assets-dir-in-store? to the config module
To allow looking up if the assets are in the store, which will happen if the Guix Data Service is running from a Guix package.
This commit is contained in:
parent
7c199c1416
commit
7e5d54148d
1 changed files with 8 additions and 1 deletions
|
|
@ -17,7 +17,10 @@
|
||||||
;;; <http://www.gnu.org/licenses/>.
|
;;; <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
(define-module (guix-data-service config)
|
(define-module (guix-data-service config)
|
||||||
#:export (%config))
|
#:use-module (guix store)
|
||||||
|
#:export (%config
|
||||||
|
|
||||||
|
assets-dir-in-store?))
|
||||||
|
|
||||||
(define %config
|
(define %config
|
||||||
(let ((config
|
(let ((config
|
||||||
|
|
@ -57,3 +60,7 @@
|
||||||
(database-name . "guix_data_service"))))
|
(database-name . "guix_data_service"))))
|
||||||
(lambda (key)
|
(lambda (key)
|
||||||
(assoc-ref config key))))
|
(assoc-ref config key))))
|
||||||
|
|
||||||
|
(define assets-dir-in-store?
|
||||||
|
(string-prefix? (%store-prefix)
|
||||||
|
(%config 'assets-dir)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue