{
  lib,
  config,
  pkgs,
  ...
}: let
  cfg = config.myConfig.nix-ld;
in {
  options.myConfig.nix-ld = {
    enable = lib.mkEnableOption "ld replacement for external binaries";
  };

  config = lib.mkIf cfg.enable {
    programs.nix-ld = {
      enable = true;
      libraries = with pkgs; [libclang stdenv.cc.cc];
    };
  };
}
