2020-01-19 21:53:58 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
let
|
|
|
|
docspell = import ./release.nix;
|
2020-06-28 11:36:46 +00:00
|
|
|
full-text-search = {
|
|
|
|
enabled = true;
|
|
|
|
solr.url = "http://localhost:${toString config.services.solr.port}/solr/docspell";
|
|
|
|
};
|
2020-01-19 21:53:58 +00:00
|
|
|
in
|
|
|
|
{
|
2020-06-28 11:36:46 +00:00
|
|
|
imports = docspell.modules ++ [ ./solr.nix ];
|
2020-01-19 21:53:58 +00:00
|
|
|
|
|
|
|
i18n = {
|
|
|
|
defaultLocale = "en_US.UTF-8";
|
|
|
|
};
|
2021-07-29 16:09:49 +00:00
|
|
|
console.keyMap = "de";
|
2020-01-19 21:53:58 +00:00
|
|
|
|
|
|
|
users.users.root = {
|
|
|
|
password = "root";
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
config = {
|
|
|
|
packageOverrides = pkgs:
|
|
|
|
let
|
|
|
|
callPackage = pkgs.lib.callPackageWith(custom // pkgs);
|
|
|
|
custom = {
|
2020-01-22 22:11:02 +00:00
|
|
|
docspell = callPackage docspell.currentPkg {};
|
2020-01-19 21:53:58 +00:00
|
|
|
};
|
|
|
|
in custom;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.docspell-joex = {
|
|
|
|
enable = true;
|
2020-06-28 11:36:46 +00:00
|
|
|
waitForTarget = "solr-init.target";
|
2020-03-01 20:34:11 +00:00
|
|
|
bind.address = "0.0.0.0";
|
|
|
|
base-url = "http://localhost:7878";
|
2020-09-25 19:58:02 +00:00
|
|
|
jvmArgs = [ "-J-Xmx1536M" ];
|
2020-06-28 11:36:46 +00:00
|
|
|
inherit full-text-search;
|
2020-01-19 21:53:58 +00:00
|
|
|
};
|
|
|
|
services.docspell-restserver = {
|
|
|
|
enable = true;
|
2020-06-28 11:36:46 +00:00
|
|
|
bind.address = "0.0.0.0";
|
|
|
|
integration-endpoint = {
|
|
|
|
enabled = true;
|
|
|
|
http-header = {
|
|
|
|
enabled = true;
|
|
|
|
header-value = "test123";
|
|
|
|
};
|
|
|
|
};
|
2021-09-06 12:25:10 +00:00
|
|
|
openid = [
|
|
|
|
{ enabled = true;
|
|
|
|
display = "Local";
|
|
|
|
provider = {
|
|
|
|
provider-id = "local";
|
|
|
|
client-id = "cid1";
|
|
|
|
client-secret = "csecret-1";
|
|
|
|
authorize-url = "http:auth";
|
|
|
|
token-url = "http:token";
|
|
|
|
sign-key = "b64:uiaeuae";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2020-06-28 11:36:46 +00:00
|
|
|
inherit full-text-search;
|
2020-01-19 21:53:58 +00:00
|
|
|
};
|
|
|
|
|
2020-01-24 20:56:48 +00:00
|
|
|
environment.systemPackages =
|
2021-08-28 10:52:43 +00:00
|
|
|
[ pkgs.docspell.server
|
2020-06-28 11:36:46 +00:00
|
|
|
pkgs.docspell.joex
|
|
|
|
pkgs.jq
|
|
|
|
pkgs.telnet
|
2020-09-08 16:07:04 +00:00
|
|
|
pkgs.htop
|
|
|
|
pkgs.openjdk
|
2020-01-24 20:56:48 +00:00
|
|
|
];
|
2020-01-22 22:11:02 +00:00
|
|
|
|
2020-06-28 11:36:46 +00:00
|
|
|
|
2020-01-19 21:53:58 +00:00
|
|
|
services.xserver = {
|
|
|
|
enable = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
hostName = "docspelltest";
|
2020-02-28 20:18:10 +00:00
|
|
|
firewall.allowedTCPPorts = [7880];
|
2020-01-19 21:53:58 +00:00
|
|
|
};
|
|
|
|
|
2021-08-28 10:52:43 +00:00
|
|
|
system.stateVersion = "21.05";
|
2020-01-19 21:53:58 +00:00
|
|
|
|
|
|
|
}
|