diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23 14:19:49 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-23 14:38:00 +0200 |
commit | 887bb5fa5a5a7b8b91d371de1a5c8280f9505744 (patch) | |
tree | 2486f49317aded421a8a33d692960651fff8a437 /src/libmain | |
parent | 1993b10d1169b04b83443a9ef5d4e3e38667afeb (diff) |
--version: Print some config info
Such as whether Nix is built with signed binary cache support, and the
location of the configuration file.
Diffstat (limited to 'src/libmain')
-rw-r--r-- | src/libmain/shared.cc | 14 |
1 files changed, 14 insertions, 0 deletions
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(); } |