2023-01-20 22:38:34 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
networking.hostName = "oxigraph";
|
|
|
|
system.stateVersion = "22.11";
|
|
|
|
c3d2.hq.statistics.enable = true;
|
|
|
|
deployment = {
|
2023-01-21 19:13:08 +01:00
|
|
|
vcpu = 16;
|
2023-01-20 22:38:34 +01:00
|
|
|
mem = 8192;
|
2023-01-21 19:13:08 +01:00
|
|
|
needForSpeed = true;
|
2023-01-20 22:38:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
users = {
|
|
|
|
groups.oxigraph = {};
|
|
|
|
users.oxigraph = {
|
|
|
|
isSystemUser = true;
|
|
|
|
group = "oxigraph";
|
|
|
|
home = "/var/lib/oxigraph";
|
|
|
|
createHome = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.oxigraph = {
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
after = [ "network.target" ];
|
|
|
|
serviceConfig = {
|
|
|
|
User = "oxigraph";
|
|
|
|
Group = "oxigraph";
|
|
|
|
ExecStart = "${pkgs.oxigraph}/bin/oxigraph_server serve -l ${config.users.users.oxigraph.home}/data";
|
|
|
|
};
|
|
|
|
};
|
2023-01-22 21:03:35 +01:00
|
|
|
|
|
|
|
# curl https://dumps.wikimedia.org/wikidatawiki/entities/latest-all.nt.bz2 |bzip2 -cd - | parallel -j`nproc` --pipe -L 100000 --joblog /tmp/split_log.txt --resume-failed 'F=$(mktemp /tmp/wikidata-XXXXXX); cat > $F && time curl -X POST -H 'Content-Type:application/n-triples' -T $F "http://localhost:7878/store?graph=https://wikidata.org/"; rm $F'
|
2023-01-20 22:38:34 +01:00
|
|
|
}
|