mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-02 23:21:02 +01:00
Co-authored-by: Tim Keller <tjk@tjkeller.xyz> Co-authored-by: Benedikt M. Rips <benedikt.rips@gmail.com>
33 lines
855 B
Nix
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}
|
|
'';
|
|
}
|