recoll: add module

This commit is contained in:
Gabriel Arazas 2022-02-07 18:54:09 +08:00 committed by Robert Helgesson
parent b13946438f
commit 0e2f7876d2
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
10 changed files with 330 additions and 0 deletions

View file

@ -0,0 +1,16 @@
nocjk = 0
skippedNames+ = node_modules
topdirs = ~/Downloads ~/Documents ~/library
underscoresasletter = 1
[~/library/projects]
skippedNames+ = .editorconfig .gitignore result flake.lock go.sum
[~/library/projects/software]
skippedNames+ = target result
[~/what-is-this-project]
skippedNames+ = whoa-there

View file

@ -0,0 +1,35 @@
{ config, ... }:
{
services.recoll = {
enable = true;
package = config.lib.test.mkStubPackage { };
configDir = "${config.xdg.configHome}/recoll";
settings = {
topdirs = [ "~/Downloads" "~/Documents" "~/library" ];
"skippedNames+" = [ "node_modules" ];
underscoresasletter = true;
nocjk = false;
"~/library/projects" = {
"skippedNames+" =
[ ".editorconfig" ".gitignore" "result" "flake.lock" "go.sum" ];
};
"~/library/projects/software" = {
"skippedNames+" = [ "target" "result" ];
};
"~/what-is-this-project" = { "skippedNames+" = [ "whoa-there" ]; };
};
};
nmt.script = ''
assertFileExists home-files/.config/systemd/user/recollindex.service
assertFileExists home-files/.config/systemd/user/recollindex.timer
assertFileExists home-files/.config/recoll/recoll.conf
assertFileContent home-files/.config/recoll/recoll.conf \
${./basic-configuration.conf}
'';
}

View file

@ -0,0 +1,25 @@
b = 10
d = 0
e = This should be the second to the last non-attrset value in the config.
g = This is coming from a list
[a]
foo = bar
[c]
a = This should appear as the second section.
aa = 1
b = 53
[f]
a = This should be second to the last for the attribute names with an attrset.
b = 3193
c = 0
d = Hello there
[foo]
bar = This should be the last attribute with an attrset.
baz = 42

View file

@ -0,0 +1,45 @@
# This is a test primarily concerned with the order of the configuration. The
# configuration is dynamically generated in alphabetical order of the top-level
# attribute names. Because of this, it is possible to override top-level
# attributes that are supposed to be configured in the top-level configuration.
{ config, ... }:
{
services.recoll = {
enable = true;
package = config.lib.test.mkStubPackage { };
settings = {
a = { foo = "bar"; };
b = 10;
c = {
a = "This should appear as the second section.";
b = 53;
aa = true;
};
d = false;
e =
"This should be the second to the last non-attrset value in the config.";
f = {
a =
"This should be second to the last for the attribute names with an attrset.";
b = 3193;
c = false;
d = [ "Hello" "there" ];
};
foo = {
bar = "This should be the last attribute with an attrset.";
baz = 42;
};
g = [ "This" "is" "coming" "from" "a" "list" ];
};
};
nmt.script = ''
assertFileExists home-files/.config/systemd/user/recollindex.service
assertFileExists home-files/.config/systemd/user/recollindex.timer
assertFileExists home-files/.recoll/recoll.conf
assertFileContent home-files/.recoll/recoll.conf \
${./config-format-order.conf}
'';
}

View file

@ -0,0 +1,4 @@
{
recoll-basic-configuration = ./basic-configuration.nix;
recoll-config-format-order = ./config-format-order.nix;
}