mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 09:58:26 +00:00
Prepare nixos setup for full-text-search and new consumedir settings
This commit is contained in:
@ -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";
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user