{
  config,
  lib,
  ...
}:

{
  imports = [ ];

  options.me = {
    uutils.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      example = true;
      description = "Whether we want to replace GNU coreutils with uutils (a rust drop-in replacement).";
    };
  };

  config = lib.mkIf config.me.uutils.enable {
    # environment.corePackages automatically installes coreutils-full, so merely installing uutils-coreutils-noprefix is insufficient for replacing GNU coreutils.
    nixpkgs.overlays = [
      (final: prev: {
        coreutils = final.uutils-coreutils-noprefix;
        coreutils-full = final.uutils-coreutils-noprefix;
      })
    ];
  };
}
