1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-15 17:50:53 +00:00
flake-parts/modules/overlay.nix
Robert Hensing 77771f1d6d Add overlay
2021-11-22 22:44:39 +01:00

32 lines
1 KiB
Nix

{ config, lib, flake-modules-core-lib, ... }:
let
inherit (lib)
mkOption
types
;
inherit (flake-modules-core-lib)
mkSubmoduleOptions
;
in
{
options = {
flake = mkSubmoduleOptions {
overlay = mkOption {
# uniq should be ordered: https://github.com/NixOS/nixpkgs/issues/147052
# also update description when done
type = types.uniq (types.functionTo (types.functionTo (types.lazyAttrsOf types.unspecified)));
# This eta expansion exists for the sole purpose of making nix flake check happy.
apply = f: final: prev: f final prev;
default = _: _: { };
defaultText = lib.literalExpression or lib.literalExample ''final: prev: {}'';
description = ''
An overlay.
Note that this option's type is not mergeable. While overlays can be
composed, the order of composition is significant, but the module
system does not guarantee deterministic definition ordering.
'';
};
};
};
}