Prepare nixos setup for full-text-search and new consumedir settings

This commit is contained in:
Eike Kettner
2020-06-28 13:36:46 +02:00
parent d3b3c6289b
commit 7193279053
4 changed files with 128 additions and 6 deletions

View File

@ -1,9 +1,13 @@
{ config, pkgs, ... }:
let
docspell = import ./release.nix;
full-text-search = {
enabled = true;
solr.url = "http://localhost:${toString config.services.solr.port}/solr/docspell";
};
in
{
imports = docspell.modules;
imports = docspell.modules ++ [ ./solr.nix ];
i18n = {
defaultLocale = "en_US.UTF-8";
@ -28,25 +32,42 @@ in
services.docspell-joex = {
enable = true;
waitForTarget = "solr-init.target";
bind.address = "0.0.0.0";
base-url = "http://localhost:7878";
inherit full-text-search;
};
services.docspell-restserver = {
bind.address = "0.0.0.0";
enable = true;
bind.address = "0.0.0.0";
integration-endpoint = {
enabled = true;
http-header = {
enabled = true;
header-value = "test123";
};
};
inherit full-text-search;
};
services.docspell-consumedir = {
enable = true;
watchDirs = ["/tmp/test"];
urls = ["http://localhost:7880/api/v1/open/upload/item/blabla"];
integration-endpoint = {
enabled = true;
header = "Docspell-Integration:test123";
};
watchDirs = ["/tmp/docs"];
urls = ["http://localhost:7880/api/v1/open/integration/item"];
};
environment.systemPackages =
[ pkgs.docspell.tools
pkgs.docspell.server
pkgs.docspell.joex pkgs.jq
pkgs.docspell.joex
pkgs.jq
pkgs.telnet
];
services.xserver = {
enable = false;
};
@ -56,6 +77,11 @@ in
firewall.allowedTCPPorts = [7880];
};
system.activationScripts = {
initUploadDir = ''
mkdir -p ${builtins.concatStringsSep " " config.services.docspell-consumedir.watchDirs}
'';
};
system.stateVersion = "20.03";
}