mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01:00
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
1 changed files with 1 additions and 8 deletions
|
@ -24,14 +24,7 @@ in {
|
|||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = with types;
|
||||
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"; };
|
||||
type = tomlFormat.type;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue