@@ -220,6 +220,11 @@
|
||||
in conjunction with an external webserver to replace this functionality.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
The fourStore and fourStoreEndpoint modules have been removed.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ in
|
||||
#kdm = 39; # dropped in 17.03
|
||||
#ghostone = 40; # dropped in 18.03
|
||||
git = 41;
|
||||
fourstore = 42;
|
||||
fourstorehttp = 43;
|
||||
#fourstore = 42; # dropped in 20.03
|
||||
#fourstorehttp = 43; # dropped in 20.03
|
||||
virtuoso = 44;
|
||||
rtkit = 45;
|
||||
dovecot2 = 46;
|
||||
|
||||
@@ -254,8 +254,6 @@
|
||||
./services/continuous-integration/jenkins/default.nix
|
||||
./services/continuous-integration/jenkins/job-builder.nix
|
||||
./services/continuous-integration/jenkins/slave.nix
|
||||
./services/databases/4store-endpoint.nix
|
||||
./services/databases/4store.nix
|
||||
./services/databases/aerospike.nix
|
||||
./services/databases/cassandra.nix
|
||||
./services/databases/clickhouse.nix
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.fourStoreEndpoint;
|
||||
endpointUser = "fourstorehttp";
|
||||
run = "${pkgs.su}/bin/su -s ${pkgs.runtimeShell} ${endpointUser} -c";
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.fourStoreEndpoint = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable 4Store SPARQL endpoint.";
|
||||
};
|
||||
|
||||
database = mkOption {
|
||||
default = config.services.fourStore.database;
|
||||
description = "RDF database name to expose via the endpoint. Defaults to local 4Store database name.";
|
||||
};
|
||||
|
||||
listenAddress = mkOption {
|
||||
default = null;
|
||||
description = "IP address to listen on.";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
default = 8080;
|
||||
description = "port to listen on.";
|
||||
};
|
||||
|
||||
options = mkOption {
|
||||
default = "";
|
||||
description = "Extra CLI options to pass to 4Store's 4s-httpd process.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
assertions = singleton
|
||||
{ assertion = cfg.enable -> cfg.database != "";
|
||||
message = "Must specify 4Store database name";
|
||||
};
|
||||
|
||||
users.users = singleton
|
||||
{ name = endpointUser;
|
||||
uid = config.ids.uids.fourstorehttp;
|
||||
description = "4Store SPARQL endpoint user";
|
||||
};
|
||||
|
||||
services.avahi.enable = true;
|
||||
|
||||
systemd.services."4store-endpoint" = {
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
script = ''
|
||||
${run} '${pkgs.rdf4store}/bin/4s-httpd -D ${cfg.options} ${if cfg.listenAddress!=null then "-H ${cfg.listenAddress}" else "" } -p ${toString cfg.port} ${cfg.database}'
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.fourStore;
|
||||
stateDir = "/var/lib/4store";
|
||||
fourStoreUser = "fourstore";
|
||||
run = "${pkgs.su}/bin/su -s ${pkgs.runtimeShell} ${fourStoreUser}";
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.fourStore = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable 4Store RDF database server.";
|
||||
};
|
||||
|
||||
database = mkOption {
|
||||
default = "";
|
||||
description = "RDF database name. If it doesn't exist, it will be created. Databases are stored in ${stateDir}.";
|
||||
};
|
||||
|
||||
options = mkOption {
|
||||
default = "";
|
||||
description = "Extra CLI options to pass to 4Store.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
assertions = singleton
|
||||
{ assertion = cfg.enable -> cfg.database != "";
|
||||
message = "Must specify 4Store database name.";
|
||||
};
|
||||
|
||||
users.users = singleton
|
||||
{ name = fourStoreUser;
|
||||
uid = config.ids.uids.fourstore;
|
||||
description = "4Store database user";
|
||||
home = stateDir;
|
||||
};
|
||||
|
||||
services.avahi.enable = true;
|
||||
|
||||
systemd.services."4store" = {
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
preStart = ''
|
||||
mkdir -p ${stateDir}/
|
||||
chown ${fourStoreUser} ${stateDir}
|
||||
if ! test -e "${stateDir}/${cfg.database}"; then
|
||||
${run} -c '${pkgs.rdf4store}/bin/4s-backend-setup ${cfg.database}'
|
||||
fi
|
||||
'';
|
||||
|
||||
script = ''
|
||||
${run} -c '${pkgs.rdf4store}/bin/4s-backend -D ${cfg.options} ${cfg.database}'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user