nixos-configs/apps/gen-docs/getConfigMeta.nix
matt1432 20e5b7dac4
All checks were successful
Discord / discord commits (push) Has been skipped
feat(gen-docs): write nix code outside script
2025-01-20 20:37:52 -05:00

12 lines
310 B
Nix

configs: let
inherit (builtins) mapAttrs replaceStrings;
trimNewlines = s: replaceStrings ["\n"] [" "] s;
in {
attrs =
mapAttrs (_: v: {
roleDesc = trimNewlines (v.config.meta.roleDescription or "");
hwDesc = trimNewlines (v.config.meta.hardwareDescription or "");
})
configs;
}