1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
home-manager/tests/modules/services/recoll/config-format-order.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

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