I’m using a flake-based configuration with flake-parts’ easyOverlay to auto-build packages from …/packages, expecting them to appear under pkgs.my in my home-manager setup.
I have two configurations:
- Overlay Import:
{ inputs, ... }: let
overlays = import ../overlays { inherit inputs; };
in {
perSystem = { system, ... }: let
pkgs = import inputs.nixpkgs {
inherit system overlays;
config = {
allowAliases = true;
allowUnfree = true;
allowUnsupportedSystem = true;
};
};
in { _module.args.pkgs = pkgs; };
}
- Custom Package with easyOverlay:
{ inputs, ... }: {
imports = [ inputs.flake-parts.flakeModules.easyOverlay ];
perSystem = { lib, pkgs, config, ... }: let
inherit (lib.filesystem) packagesFromDirectoryRecursive;
in {
packages = packagesFromDirectoryRecursive {
inherit (pkgs) callPackage;
directory = ../packages;
};
overlayAttrs = {
my = config.packages;
};
};
}
The custom package isn’t available under pkgs.my. in home-manager. Even after removing the my
key and updating references, nothing changes.
Any ideas on merging these overlays properly or best practices for using easyOverlay in a home-manager configuration?
Thanks!