I’d like to combine both word files into 1. The mywords in agenix contains names of people, I don’t want them to be readable in git. They can be readable in the /nix/store.
I get the following error:
error: access to absolute path ‘/run/agenix/files/programs/codebook/mywords’ is forbidden in pure evaluation mode (use ‘–impure’ to override)
let
importStrings =
path:
builtins.filter (x: builtins.isString x && x != "" && !(lib.strings.hasPrefix "#" x)) (
builtins.split "\n" (builtins.readFile path)
);
in
{
home-manager.users."myuser" = { pkgs, ... }: {
xdg.configFile."codebook/codebook.toml".source = (pkgs.formats.toml { }).generate "codebook.toml" {
dictionaries = [
"en_us"
"fr"
"de"
"it"
"es"
];
## Words that should always be flagged as incorrect.
flag_words = importStrings ./codebook_flag_words.md;
## Custom allowlist of words to ignore (case-insensitive).
words =
importStrings ./codebook_words_global.md
++ importStrings (config.age.secrets."codebook/mywords".path);
};
};
}