docspell/nix/test-vm.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

87 lines
1.6 KiB
Nix
Raw Permalink Normal View History

2024-03-09 00:28:44 +00:00
{
config,
pkgs,
...
}: let
full-text-search = {
enabled = true;
backend = "solr";
solr.url = "http://localhost:8983/solr/docspell";
};
jdbc = {
url = "jdbc:postgresql://localhost:5432/docspell";
user = "dev";
password = "dev";
};
in {
services.dev-postgres = {
enable = true;
databases = ["docspell"];
};
services.dev-email.enable = true;
services.dev-solr = {
enable = true;
cores = ["docspell"];
2024-03-10 19:49:56 +00:00
heap = 512;
2024-03-09 00:28:44 +00:00
};
port-forward.dev-webmail = 8080;
port-forward.dev-solr = 8983;
2024-03-09 23:59:56 +00:00
environment.systemPackages = with pkgs; [
jq
htop
iotop
coreutils
];
2024-03-09 00:28:44 +00:00
networking = {
hostName = "docspell-test-vm";
firewall.allowedTCPPorts = [7880];
};
2024-03-10 19:49:56 +00:00
virtualisation.memorySize = 2048;
virtualisation.cores = 2;
2024-03-09 00:28:44 +00:00
virtualisation.forwardPorts = [
{
from = "host";
host.port = 7881;
guest.port = 7880;
}
];
services.docspell-restserver = {
enable = true;
bind.address = "0.0.0.0";
backend = {
addons.enabled = true;
signup.mode = "open";
inherit jdbc;
};
integration-endpoint = {
enabled = true;
http-header = {
enabled = true;
header-value = "test123";
};
};
admin-endpoint = {
secret = "admin123";
};
inherit full-text-search;
};
services.docspell-joex = {
enable = true;
bind.address = "0.0.0.0";
inherit jdbc full-text-search;
addons = {
executor-config = {
runner = "nix-flake,trivial";
nspawn.enabled = true;
};
};
};
}