Files
nixpkgs/lib/tests/modules/freeform-deprecated-malicous.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
642 B
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{ lib, ... }:
let
inherit (lib) types mkOption;
in
{
options.either = mkOption {
type = types.submodule {
freeformType = (types.either types.int types.int);
};
};
options.eitherBehindNullor = mkOption {
type = types.submodule {
freeformType = types.nullOr (types.either types.int types.int);
};
};
options.oneOf = mkOption {
type = types.submodule {
freeformType = (
types.oneOf [
types.int
types.int
]
);
};
};
options.number = mkOption {
type = types.submodule {
freeformType = (types.number); # either int float
};
};
}