summaryrefslogtreecommitdiff
path: root/guix/config.scm.in
diff options
context:
space:
mode:
Diffstat (limited to 'guix/config.scm.in')
-rw-r--r--guix/config.scm.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/guix/config.scm.in b/guix/config.scm.in
index 772ea8c289..3a5c50e00a 100644
--- a/guix/config.scm.in
+++ b/guix/config.scm.in
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -23,6 +23,7 @@
%guix-home-page-url
%store-directory
%state-directory
+ %config-directory
%system
%libgcrypt
%nixpkgs
@@ -50,11 +51,16 @@
"@PACKAGE_URL@")
(define %store-directory
- "@storedir@")
+ (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
+ "@storedir@"))
(define %state-directory
;; This must match `NIX_STATE_DIR' as defined in `daemon.am'.
- "@guix_localstatedir@/nix")
+ (or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/nix"))
+
+(define %config-directory
+ ;; This must match `NIX_CONF_DIR' as defined in `daemon.am'.
+ (or (getenv "NIX_CONF_DIR") "@guix_sysconfdir@/guix"))
(define %system
"@guix_system@")