blob: 5fdcfb7424650de344249f7008eb22c9ea601c7a (
plain) (
tree)
|
|
#include <atomic>
#include "command.hh"
#include "shared.hh"
#include "store-api.hh"
using namespace nix;
struct CmdOptimiseStore : StoreCommand {
CmdOptimiseStore() = default;
std::string name() override { return "optimise-store"; }
std::string description() override {
return "replace identical files in the store by hard links";
}
Examples examples() override {
return {
Example{"To optimise the Nix store:", "nix optimise-store"},
};
}
void run(ref<Store> store) override { store->optimiseStore(); }
};
static RegisterCommand r1(make_ref<CmdOptimiseStore>());
|