DRY facts generator lib for clan
clan = {
specialArgs = {
factsGenerator = clan-fact-generators.lib { inherit pkgs; };
};
};
Now you can use the predefined generators
{ factsGenerator , ... }:
with factsGenerator;
{
clan.core.facts.services.wireguard = factsGenerator.wireguard {};
clan.core.facts.services.tinc = factsGenerator.tinc {};
clan.core.facts.services.password = factsGenerator.password { name = "palo"; };
clan.core.facts.services.ssh_host = factsGenerator.ssh { name = "host"; };
clan.core.facts.services.ssh_borg = factsGenerator.ssh { name = "borg"; };
};
Every
factsGenerator
accepts aname
(usually optional) parameter andservice
(optional) parameter to change the secret name.