{ moduleFunctions }:
let

  configPath = ./config;
  printerPath = configPath + /printers;

  deviceswithFunctions = builtins.listToAttrs (
    map
      (name: {
        name = builtins.substring 0 (builtins.stringLength name - 4) name;
        value = import (configPath + "/${name}") {
          inherit
            moduleFunctions
            ;
        };
      })
      (
        builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
          builtins.attrNames (builtins.readDir configPath)
        )
      )
  );

  devicesPrinters = builtins.listToAttrs (
    map
      (name: {
        name = builtins.substring 0 (builtins.stringLength name - 4) name;
        value = import (printerPath + "/${name}") {
          inherit
            moduleFunctions
            ;
        };
      })
      (
        builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
          builtins.attrNames (builtins.readDir printerPath)
        )
      )
  );

  devices = deviceswithFunctions // devicesPrinters;
in
{
  devices = devices;
}
