diff --git a/nixos/doc/manual/development/option-types.xml b/nixos/doc/manual/development/option-types.xml index 9827615349d97..3d2191e2f3f31 100644 --- a/nixos/doc/manual/development/option-types.xml +++ b/nixos/doc/manual/development/option-types.xml @@ -54,6 +54,46 @@ + + + types.anything + + + + A type that accepts any value and recursively merges attribute sets together. + This type is recommended when the option type is unknown. + + <literal>types.anything</literal> Example + + Two definitions of this type like + +{ + str = lib.mkDefault "foo"; + pkg.hello = pkgs.hello; + fun.fun = x: x + 1; +} + + +{ + str = lib.mkIf true "bar"; + pkg.gcc = pkgs.gcc; + fun.fun = lib.mkForce (x: x + 2); +} + + will get merged to + +{ + str = "bar"; + pkg.gcc = pkgs.gcc; + pkg.hello = pkgs.hello; + fun.fun = x: x + 2; +} + + + + + + types.attrs