2025-10-05 20:04:03 -04:00

34 lines
760 B
Nix

{
config,
lib,
pkgs,
...
}:
{
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 (
lib.mkMerge [
{
# 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;
})
];
}
]
);
}