| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
| |
No change in behavior.
|
|
|
|
| |
Expecting no change in behavior.
|
| |
|
|
|
|
|
|
|
| |
This reverts commit c8c538f2ab2432f2dd1eb637657c1bf5b54a147f.
Reason: removal did not follow a deprecation process and it hurts
nixops 1.7 users.
|
| |
|
| |
|
|\
| |
| | |
lib/options/showOption: fix quoting of attr-names that are not identifiers
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
indicate a function inside an option structure
The motivation is to have a single identifier for that. Useful for the
next commit where I'll try to escape option-parts correctly (options can
be any kind of strings, but unless these are Nix identifiers, they must
be quoted).
Since `<function body>` (or `<name>`/`*`) are special identifiers in
error messages and the manual, we need a unique way to mark an option
part as function call because these are not to be quoted.
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| | |
@Infinisil: This isn't right, the name shouldn't be changed, but instead a description should be added
https://github.com/NixOS/nixpkgs/pull/191353#discussion_r978983401
|
| | |
|
|/
|
|
|
| |
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
|
| |
|
|\
| |
| | |
lib/types: add `number`
|
| |
| |
| |
| | |
For numbers that can be ints or floats.
|
|/
|
|
|
|
|
|
| |
More nixpkgs code such as `boot.initrd.systemd.emergencyAccess` defines
options that takes hashed passwords, so move the type definition from
modules/ into lib/.
The type definition itself stays unchanged.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The module system already uses the parent module's _file as a fallback,
so we don't need to inject the file in a weird way
|
|\
| |
| | |
lib/types: allow custom `submoduleWith` descriptions
|
| |
| |
| |
| |
| |
| |
| |
| | |
Currently the only way to set the description for a submodule type is to
use `freeformType`. This is not ideal as it requires setting a
freeform type, and evaluates the submodule config unnecessarily.
Instead, add a `description` argument to `submoduleWith`.
|
|\ \
| | |
| | | |
`lib.types.functionTo` type merging and docs
|
| | | |
|
| |/ |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Probably being the most prominent document demonstrating the problem,
configuration.nix(5) describes various types in plural, e.g.
- ` Type: list of strings`
- ` Type: list of systemd options`
However, there are other cases where appending "s" to the inner type
effectively changes the type, e.g.
- ```
Type: list of string matching the pattern
[a-zA-Z0-9@%:_.\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)s
```
This should've read "list of string[s]..." but instead changes the
regular expression.
Simply drop the best-effort plural in favour of correctness and
simplicity rather than adding more grammar related logic/trying to fix
this.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
types.optionSet has been deprecated for almost 10 years now
(0e333688cea468a28516bf6935648c03ed62a7bb)! A removal
was already attempted in 2019
(27982b408e465554b8831f492362bc87ed0ec02a), but it was promptly
reinstantiated since some third-party uses were discovered
(f531ce75e4178c6867cc1d0f7fec96b2d5c3f1cb).
It's finally time to remove it for good :)
|
|\
| |
| |
| |
| | |
hercules-ci/issue-146882-transparent-submodule-options
lib.modules: Let module declare options directly in bare submodule
|
| |
| |
| |
| | |
This should save about four calls per module.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... where a bare submodule is an option that has a type like
`submoduleWith x`, as opposed to `attrsOf (submoduleWith x)`.
This makes migration unnecessary when introducing a freeform type
in an existing option tree.
Closes #146882
|
|\ \
| | |
| | | |
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.
|
|/ |
|
|\
| |
| | |
lib/types: Fix functionTo description
|
| | |
|
|/
|
|
|
|
| |
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`
|
| |
|
|
|
|
|
|
| |
An empty list is [], not {}!
Also, non-empty lists shouldn't have a default of an empty list!
|
|
|
|
|
| |
Couldn't extend types.uniq and it had a silly name anyway.
Now we can have better error messages.
|
|
|
|
| |
Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
|