{ inputs, ... }: with inputs; with nixpkgs.lib; let
  mapInputs = fn: map fn (lists.remove "self" (attrNames inputs));
  channelPath = "/etc/nix/channels";
in {
  nix = {
    nixPath = mapInputs (i: "${i}=${channelPath}/${i}");
    registry = listToAttrs
      (mapInputs (name: {
        inherit name;
        value = {flake = inputs.${name};};
      }));
  };

  systemd.tmpfiles.rules = mapInputs (i: "L+ ${channelPath}/${i}     - - - - ${inputs.${i}.outPath}");
}