From 10486e6b311b3c5ae1c3477fee058704cea7cb4a Mon Sep 17 00:00:00 2001 From: Bojun Ren Date: Sun, 7 Jul 2024 02:08:39 +0800 Subject: [PATCH] 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). --- modules/programs/starship.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index f253fa7f0..9ccff7fcf 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -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 '' {