2024-06-30 16:58:29 +01:00
|
|
|
with import <nixpkgs> { };
|
2023-09-28 12:17:30 +01:00
|
|
|
|
|
|
|
|
let
|
2025-11-11 21:49:45 +00:00
|
|
|
inherit (builtins) readDir filter;
|
2024-06-30 16:58:29 +01:00
|
|
|
devices = filter (n: n != "families") (lib.mapAttrsToList (n: t: n) (readDir ../devices));
|
|
|
|
|
texts = map (
|
|
|
|
|
n:
|
|
|
|
|
let
|
|
|
|
|
d = import ../devices/${n}/default.nix;
|
|
|
|
|
d' = {
|
2024-07-10 23:36:24 +01:00
|
|
|
description = ''
|
2025-09-18 21:58:26 +01:00
|
|
|
== ${n}
|
2024-07-10 23:36:24 +01:00
|
|
|
'';
|
2025-11-11 21:49:45 +00:00
|
|
|
}
|
|
|
|
|
// d;
|
2024-06-30 16:58:29 +01:00
|
|
|
in
|
2025-09-18 21:58:26 +01:00
|
|
|
"\n${d'.description}"
|
2024-06-30 16:58:29 +01:00
|
|
|
) devices;
|
2023-09-28 12:17:30 +01:00
|
|
|
in
|
|
|
|
|
writeText "hwdoc" ''
|
|
|
|
|
${lib.concatStringsSep "\n\n" texts}
|
|
|
|
|
|
|
|
|
|
''
|