2023-05-29 17:52:03 +00:00
|
|
|
{ lib, flake-parts-lib, ... }:
|
2022-05-25 17:53:07 +00:00
|
|
|
let
|
|
|
|
inherit (lib)
|
|
|
|
mkOption
|
|
|
|
types
|
|
|
|
;
|
|
|
|
inherit (flake-parts-lib)
|
|
|
|
mkSubmoduleOptions
|
|
|
|
;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
flake = mkSubmoduleOptions {
|
|
|
|
overlays = mkOption {
|
|
|
|
# uniq -> ordered: https://github.com/NixOS/nixpkgs/issues/147052
|
|
|
|
# also update description when done
|
|
|
|
type = types.lazyAttrsOf (types.uniq (types.functionTo (types.functionTo (types.lazyAttrsOf types.unspecified))));
|
|
|
|
# This eta expansion exists for the sole purpose of making nix flake check happy.
|
2023-05-29 17:52:03 +00:00
|
|
|
apply = lib.mapAttrs (_k: f: final: prev: f final prev);
|
2022-05-25 17:53:07 +00:00
|
|
|
default = { };
|
|
|
|
example = lib.literalExpression or lib.literalExample ''
|
|
|
|
{
|
|
|
|
default = final: prev: {};
|
|
|
|
}
|
|
|
|
'';
|
2022-11-11 06:39:25 +00:00
|
|
|
description = ''
|
2022-11-11 05:40:37 +00:00
|
|
|
An attribute set of [overlays](https://nixos.org/manual/nixpkgs/stable/#chap-overlays).
|
2022-05-25 17:53:07 +00:00
|
|
|
|
|
|
|
Note that the overlays themselves are not mergeable. While overlays
|
|
|
|
can be composed, the order of composition is significant, but the
|
|
|
|
module system does not guarantee sufficiently deterministic
|
2022-11-11 05:40:37 +00:00
|
|
|
definition ordering, across versions and when changing `imports`.
|
2022-05-25 17:53:07 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|