summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--guix/config.scm.in5
2 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 07f8539504..e7bc44dca2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,10 +36,12 @@ AC_ARG_ENABLE([daemon],
   [guix_build_daemon="$enableval"],
   [guix_build_daemon="yes"])
 
-# Prepare a version of $localstatedir that does not contain references
+# Prepare a version of $localstatedir & co. that does not contain references
 # to shell variables.
 guix_localstatedir="`eval echo $localstatedir | sed -e "s|NONE|/usr/local|g"`"
+guix_sysconfdir="`eval echo $sysconfdir | sed -e "s|NONE|/usr/local|g"`"
 AC_SUBST([guix_localstatedir])
+AC_SUBST([guix_sysconfdir])
 
 dnl We require the pkg.m4 set of macros from pkg-config.
 dnl Make sure it's available.
diff --git a/guix/config.scm.in b/guix/config.scm.in
index 772ea8c289..4835c6e5d9 100644
--- a/guix/config.scm.in
+++ b/guix/config.scm.in
@@ -23,6 +23,7 @@
             %guix-home-page-url
             %store-directory
             %state-directory
+            %config-directory
             %system
             %libgcrypt
             %nixpkgs
@@ -56,6 +57,10 @@
   ;; This must match `NIX_STATE_DIR' as defined in `daemon.am'.
   "@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@")