oxigraph: init

This commit is contained in:
Astro 2023-01-20 22:38:34 +01:00
parent 88434221ac
commit 6a4a3ca035
5 changed files with 77 additions and 0 deletions

View File

@ -564,6 +564,13 @@
];
};
oxigraph = nixosSystem' {
modules = [
self.nixosModules.cluster-options
./hosts/oxigraph
];
};
prometheus = nixosSystem' {
modules = [
self.nixosModules.microvm

View File

@ -0,0 +1,30 @@
{ config, pkgs, ... }:
{
networking.hostName = "oxigraph";
system.stateVersion = "22.11";
c3d2.hq.statistics.enable = true;
deployment = {
mem = 8192;
};
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";
};
};
}

View File

@ -137,6 +137,9 @@
} {
hostNames = [ "tmppleroma.hq.c3d2.de" ];
proxyTo.host = zentralwerk.lib.config.site.net.serv.hosts4.tmppleroma;
} {
hostNames = [ "oxigraph.hq.c3d2.de" ];
proxyTo.host = zentralwerk.lib.config.site.net.serv.hosts4.oxigraph;
} ];
};

View File

@ -79,6 +79,8 @@ with final; {
doCheck = false;
});
oxigraph = callPackage ./oxigraph.nix { };
pile = callPackage ./pile.nix { };
pi-sensors = callPackage ./pi-sensors { };

35
overlays/oxigraph.nix Normal file
View File

@ -0,0 +1,35 @@
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, llvmPackages
}:
rustPlatform.buildRustPackage rec {
pname = "oxigraph";
version = "0.3.11";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-7KbDZKKJPk3QTp4siIbdB6xKbslw73Lhc7NoeOuA0Og=";
fetchSubmodules = true;
};
cargoSha256 = "sha256-Yqn6hwejg6LzcqW0MiUN3tqrOql6cpu/5plaOz+2/ns=";
nativeBuildInputs = [
pkg-config llvmPackages.clang
];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
preConfigure = ''
cd server
'';
postBuild = ''
cd ..
'';
doCheck = false;
}