Commit Graph

32 Commits

Author SHA1 Message Date
Silvan Mosberger
4f1d724b82
Merge pull request #284551 from hercules-ci/types-attrTag
Add `types.attrTag`
2024-04-09 20:48:44 +02:00
Robert Hensing
f354686536 doc/option-types: Update sum types 2024-04-04 12:00:54 +02:00
Robert Hensing
fa8b46adf4 doc/option-types: Make attrTag example self-contained
... well, except for the ellipses, which hide unnecessary descriptions,
which you should write!
2024-04-04 11:54:46 +02:00
Robert Hensing
c0f54d3dea doc/option-types: Add attrTag example 2024-04-04 11:54:46 +02:00
Janne Heß
fcc95ff817 treewide: Fix all Nix ASTs in all markdown files
This allows for correct highlighting and maybe future automatic
formatting. The AST was verified to work with nixfmt only.
2024-03-28 09:28:12 +01:00
Robert Hensing
6949bc21ce doc/option-types: Move nullOr to Union types 2024-02-11 18:45:16 +01:00
Robert Hensing
1ad30772ea doc/option-types: Move attrTag to Sum types, remove redundant paragraph 2024-02-11 18:45:15 +01:00
Robert Hensing
2ceb5558f9 doc/option-types: Move either and oneOf to Union types 2024-02-11 18:45:15 +01:00
Robert Hensing
0feea2dbd2 doc/option-types: Write about sum and union types 2024-02-11 18:45:15 +01:00
Robert Hensing
ca81a89839 lib.types.attrTag: init 2024-02-11 18:44:52 +01:00
Robert Hensing
2b4a1a1d4f doc/option-types: Definitions are not declared 2024-01-29 19:13:37 +01:00
Silvan Mosberger
8d3978c149 lib.types.boolByOr: init
This type is necessary to have correct merging behavior for
`allowUnfreePredicate` and `allowInsecurePredicate`

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-12-08 21:50:29 +01:00
Doron Behar
3c34a1a464 nixos/doc/mkOptionType: small typo fix 2023-10-09 23:38:32 +03:00
Naïm Favier
14d3e5685a
lib/types: add pathInStore 2023-06-27 11:48:08 +02:00
Robert Hensing
16d594a0e2 lib.types.pkgs: init
A nominal type.
2023-05-10 15:55:08 +02:00
pennae
407f6196a2 nixos-render-docs: add examples support
the nixos manual contains enough examples to support them as a proper
toc entity with specialized rendering, and if in the future the nixpkgs
wants to use nixos-render-docs we will definitely have to support them.
this also allows us to restore some examples that were lost in previous
translation steps because there were too few to add renderer support
back then.
2023-05-03 19:58:21 +02:00
pennae
a15d7335a5 nixos/manual: remove .title fenced divs
pandoc drops .title classes when rendering to docbook, so these are
effectively just paragraphs anyway. without support for including them
in a table of contents the complexity of parsing them in
nixos-render-docs won't be warranted.
2023-02-10 06:40:00 +01:00
Naïm Favier
3f6fed2e59
doc,nixos/doc: unescape ellipses
Leftovers from the CommonMark conversion.
2022-12-27 17:13:49 +01:00
Naïm Favier
d11832fd96
doc,nixos/doc: unescape apostrophes
Leftovers from the CommonMark conversion.
2022-12-27 17:13:47 +01:00
figsoda
6bb0dbf91f nixos: fix typos 2022-12-17 19:31:14 -05:00
Naïm Favier
52bbbaeb09
nixos/doc/option-types: add precision loss warning for floats 2022-09-09 15:39:35 +02:00
Naïm Favier
5480f45f63
nixos/doc/option-types: refactor, document numbers 2022-07-25 11:19:06 +02:00
Robert Hensing
d9dccae07c nixos/doc: Hold off on NixOps 2 info until released 2022-06-14 23:23:41 +02:00
Robert Hensing
dfd98a5da2 lib.deferredModule: Make it properly singular 2022-06-14 23:01:27 +02:00
Robert Hensing
4746f6d03e lib.types: Add deferredModule 2022-06-14 23:01:23 +02:00
Anselm Schüler
9a8b7640e0 nixos/doc/types: note submodules’ default’s behaviour 2022-04-03 15:12:18 +02:00
Naïm Favier
9c2266c031
lib.types.package: only call toDerivation when necessary
The current logic assumes that everything that isn't a derivation is a
store path, but it can also be something that's *coercible* to a store
path, like a flake input.

Unnecessary uses of `lib.toDerivation` result in errors in pure evaluation
mode when `builtins.storePath` is disabled.

Also document what a `package` is.
2022-03-11 11:26:34 +01:00
Alexandru Scvortov
f386c42a48 nixos/doc: improve wording in "Options Types" and "Option Declarations" 2022-03-05 13:51:37 +00:00
Silvan Mosberger
5cbeddfde4 lib.types: Introduce types.optionType
This type correctly merges multiple option types together while also
annotating them with file information. In a future commit this will be
used for `_module.freeformType`
2022-03-01 19:31:00 +01:00
Silvan Mosberger
665344f148 lib/types: Introduce types.raw for unprocessed values 2022-02-22 15:54:44 +01:00
Robert Hensing
48dbe26229 nixos/doc: Document types.unique 2022-01-24 16:31:59 +01:00
Bobby Rong
bfd21cd2c1 nixos: nixos/doc/manual/development/option-types.xml to CommonMark 2021-07-03 22:20:55 +08:00