1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-02 23:21:02 +01:00
home-manager/tests/modules/misc/fontconfig/extra-config-files.nix
Tim Keller fad8e3033e
fontconfig: add fonts.fontconfig.extraConfigFiles option (#7754)
Co-authored-by: Tim Keller <tjk@tjkeller.xyz>
Co-authored-by: Benedikt M. Rips <benedikt.rips@gmail.com>
2025-09-16 22:31:54 -05:00

33 lines
855 B
Nix

let
sampleTextContent = "hello world";
fcConfD = "home-files/.config/fontconfig/conf.d";
in
{
fonts.fontconfig = {
enable = true;
configFile = {
text-label-test = {
enable = true;
label = "sample-text-config";
text = sampleTextContent;
priority = 55;
};
source-nolabel-test = {
enable = true;
source = ./sample-extra-config.conf;
};
};
};
nmt.script = ''
assertDirectoryExists ${fcConfD}
assertFileExists ${fcConfD}/55-hm-sample-text-config.conf
assertFileContent ${fcConfD}/55-hm-sample-text-config.conf \
${builtins.toFile "sample-text-config" sampleTextContent}
assertFileExists ${fcConfD}/90-hm-source-nolabel-test.conf
assertFileContent ${fcConfD}/90-hm-source-nolabel-test.conf \
${./sample-extra-config.conf}
'';
}