SSTorytime

Unified Graph Process For Mapping Knowledge

Declared in: projects/SSTorytime/default.nix

Try the service in a VM

  1. Install Nix
    Bash
    $ apt install --yes curl git jq nix
    Bash
    $ apt install --yes curl git jq nix
    Bash
    $ pacman --sync --refresh --noconfirm curl git jq nix
  2. Download a configuration file
    # default.nix
    {
      ngipkgs ? import (fetchTarball "https://github.com/ngi-nix/ngipkgs/tarball/main") { },
    }:
    ngipkgs.demo-vm (
      {
        pkgs,
        ...
      }:
    
      {
        # install tools (N4L, searchN4L, ...)
        programs.sstorytime.enable = true;
    
        services.sstorytime = {
          enable = true;
          port = 3030;
          openFirewall = true;
          createLocalDatabase = true;
        };
      }
    )
    
  3. Enable binary substituters
    Bash
    $ export NIX_CONFIG='substituters = https://cache.nixos.org/ https://ngi.cachix.org/
    trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ngi.cachix.org-1:n+CAL72ROC3qQuLxIHpV+Tw5t42WhXmMhprAGkRSrOw='
  4. Build and run a virtual machine
    Bash
    $ nix-build ./default.nix && ./result
    Bash
    $ nix-build ./default.nix && ./result
    Bash
    $ rev=$(nix-instantiate --eval --attr sources.nixpkgs.rev https://github.com/ngi-nix/ngipkgs/archive/master.tar.gz | jq --raw-output)
    $ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$rev.tar.gz --packages nix --run "nix-build ./default.nix && ./result"
    Bash
    $ nix-build ./default.nix && ./result
  5. Usage Instructions
    1. Download an n4l example file from the SSTorytime repository, like SSTorytime.n4l, and ingest it with the following command:

      $ wget https://raw.githubusercontent.com/markburgess/SSTorytime/refs/heads/main/examples/SSTorytime.n4l
      $ N4L -u SSTorytime.n4l
      

      This will transform the file to a graph and upload it to the database.

    2. Search for a term in the graph with the command line:

      searchN4L -v SSTorytime
      

    3. Or visit http://127.0.0.1:3030 in your browser for a visual search

    4. Check out the documentation for more usage examples.

Options

programs.sstorytime
programs.sstorytime.enable

Whether to enable SSTorytime.

Type:
boolean
Default:
false
Declared in:
projects/SSTorytime/programs/sstorytime/module.nix
programs.sstorytime.package

The sstorytime package to use.

Type:
package
Default:
pkgs.sstorytime
Declared in:
projects/SSTorytime/programs/sstorytime/module.nix
programs.sstorytime.sstConfigDir

Path to the directory containing the SSTconfig files.

Type:
absolute path
Default:
${pkgs.sstorytime}/share/config/SSTconfig
Declared in:
projects/SSTorytime/programs/sstorytime/module.nix
services.sstorytime
services.sstorytime.createLocalDatabase

Whether to enable configure a local PostgreSQL database for SSTorytime..

Type:
boolean
Default:
false
Declared in:
projects/SSTorytime/services/sstorytime/module.nix
services.sstorytime.enable

Whether to enable SSTorytime.

Type:
boolean
Default:
false
Declared in:
projects/SSTorytime/services/sstorytime/module.nix
services.sstorytime.openFirewall

Whether to enable the default ports in the firewall for the SSTorytime server..

Type:
boolean
Default:
false
Declared in:
projects/SSTorytime/services/sstorytime/module.nix
services.sstorytime.package

The sstorytime package to use.

Type:
package
Default:
pkgs.sstorytime
Declared in:
projects/SSTorytime/services/sstorytime/module.nix
services.sstorytime.port

Port for the SSTorytime service.

Type:
16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default:
8080
Declared in:
projects/SSTorytime/services/sstorytime/module.nix

Examples

Enable SSTorytime programs
{
  programs.sstorytime.enable = true;
}

Declared in: projects/SSTorytime/programs/sstorytime/examples/basic.nix

Enable SSTorytime server
{
  pkgs,
  ...
}:

{
  services.sstorytime = {
    enable = true;
    port = 3030;
    openFirewall = true;
    createLocalDatabase = true;
  };
}

Declared in: projects/SSTorytime/services/sstorytime/examples/basic.nix

Metadata

This project is funded by NLnet through these subgrants:

Commons
SmartSemanticDataLookup

Related links: