summaryrefslogtreecommitdiffstats
path: root/lib/tests/modules/freeform-deprecated-malicous.nix
blob: 8d9bbdf06f8239e6b177556ba388b6faca16ac49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ 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
    };
  };
}