Link: https://github.com/nix-community/stylix/pull/1652 Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
36 lines
669 B
Nix
36 lines
669 B
Nix
{
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
options,
|
|
...
|
|
}:
|
|
{
|
|
options.stylix.overlays.enable = config.lib.stylix.mkEnableTarget "packages via overlays" true;
|
|
|
|
imports = map (
|
|
f:
|
|
let
|
|
file = import f;
|
|
attrs =
|
|
if builtins.isFunction file then
|
|
file {
|
|
inherit
|
|
lib
|
|
pkgs
|
|
config
|
|
options
|
|
;
|
|
}
|
|
else
|
|
file;
|
|
in
|
|
{
|
|
_file = f;
|
|
options = attrs.options or { };
|
|
config.nixpkgs.overlays = lib.mkIf config.stylix.overlays.enable [
|
|
attrs.overlay
|
|
];
|
|
}
|
|
) (import ./autoload.nix { inherit lib; } "overlay");
|
|
}
|