starship: fix type of settings to allow all valid value
Previously, type check of `programs.starship.settings` fails for some valid settings, such as `c.commands = [["cc" "--version"]]`. The commit fix the `type` argument passed to `mkOption`, so `programs.starship.settings` can accept all valid values (of toml type).
This commit is contained in:
parent
e3582e5151
commit
10486e6b31
|
@ -24,14 +24,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = with types;
|
type = tomlFormat.type;
|
||||||
let
|
|
||||||
prim = either bool (either int str);
|
|
||||||
primOrPrimAttrs = either prim (attrsOf prim);
|
|
||||||
entry = either prim (listOf primOrPrimAttrs);
|
|
||||||
entryOrAttrsOf = t: either entry (attrsOf t);
|
|
||||||
entries = entryOrAttrsOf (entryOrAttrsOf entry);
|
|
||||||
in attrsOf entries // { description = "Starship configuration"; };
|
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue