1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-24 03:59:46 +01:00
home-manager/tests/modules/services/recoll/config-format-order.nix
2022-07-27 14:25:27 +02:00

45 lines
1.4 KiB
Nix

# 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}
'';
}