From 887bb5fa5a5a7b8b91d371de1a5c8280f9505744 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 23 Jul 2015 14:19:49 +0200 Subject: --version: Print some config info Such as whether Nix is built with signed binary cache support, and the location of the configuration file. --- src/libmain/shared.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/libmain') diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index 575fa339a..a6e8f352a 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -243,6 +243,20 @@ void parseCmdLine(int argc, char * * argv, void printVersion(const string & programName) { std::cout << format("%1% (Nix) %2%") % programName % nixVersion << std::endl; + if (verbosity > lvlInfo) { + Strings cfg; +#if HAVE_BOEHMGC + cfg.push_back("gc"); +#endif +#if HAVE_SODIUM + cfg.push_back("signed-caches"); +#endif + std::cout << "Features: " << concatStringsSep(", ", cfg) << "\n"; + std::cout << "Configuration file: " << settings.nixConfDir + "/nix.conf" << "\n"; + std::cout << "Store directory: " << settings.nixStore << "\n"; + std::cout << "State directory: " << settings.nixStateDir << "\n"; + std::cout << "Database directory: " << settings.nixDBPath << "\n"; + } throw Exit(); } -- cgit v1.2.3