liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

hardware.nix (440B)


      1 with import <nixpkgs> { };
      2 
      3 let
      4   inherit (builtins) readDir filter;
      5   devices = filter (n: n != "families") (lib.mapAttrsToList (n: t: n) (readDir ../devices));
      6   texts = map (
      7     n:
      8     let
      9       d = import ../devices/${n}/default.nix;
     10       d' = {
     11         description = ''
     12           == ${n}
     13         '';
     14       }
     15       // d;
     16     in
     17     "\n${d'.description}"
     18   ) devices;
     19 in
     20 writeText "hwdoc" ''
     21   ${lib.concatStringsSep "\n\n" texts}
     22 
     23 ''