mise: remove the settings option
mise no longer supports the separate `settings.toml` file for settings. Settings should be defined in the global configuration (`globalConfig`).
This commit is contained in:
parent
1dc235b2fb
commit
360620ec9d
5 changed files with 83 additions and 48 deletions
|
|
@ -14,15 +14,20 @@ in
|
|||
|
||||
imports =
|
||||
let
|
||||
mkRemovedWarning =
|
||||
mkRtxRemovedWarning =
|
||||
opt:
|
||||
(lib.mkRemovedOptionModule [ "programs" "rtx" opt ] ''
|
||||
The `rtx` package has been replaced by `mise`, please switch over to
|
||||
using the options under `programs.mise.*` instead.
|
||||
'');
|
||||
|
||||
in
|
||||
map mkRemovedWarning [
|
||||
[
|
||||
(lib.mkRenamedOptionModule
|
||||
[ "programs" "mise" "settings" ]
|
||||
[ "programs" "mise" "globalConfig" "settings" ]
|
||||
)
|
||||
]
|
||||
++ map mkRtxRemovedWarning [
|
||||
"enable"
|
||||
"package"
|
||||
"enableBashIntegration"
|
||||
|
|
@ -47,38 +52,32 @@ in
|
|||
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption { inherit config; };
|
||||
|
||||
globalConfig = mkOption {
|
||||
type = tomlFormat.type;
|
||||
inherit (tomlFormat) type;
|
||||
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
settings = {
|
||||
disable_tools = [ "node" ];
|
||||
experimental = true;
|
||||
verbose = false;
|
||||
};
|
||||
|
||||
tool_alias = {
|
||||
node.versions = {
|
||||
my_custom_node = "20";
|
||||
};
|
||||
};
|
||||
|
||||
tools = {
|
||||
node = "lts";
|
||||
python = ["3.10" "3.11"];
|
||||
};
|
||||
|
||||
aliases = {
|
||||
my_custom_node = "20";
|
||||
};
|
||||
'';
|
||||
description = ''
|
||||
Config written to {file}`$XDG_CONFIG_HOME/mise/config.toml`.
|
||||
|
||||
See <https://mise.jdx.dev/configuration.html#global-config-config-mise-config-toml>
|
||||
for details on supported values.
|
||||
'';
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
type = tomlFormat.type;
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
verbose = false;
|
||||
experimental = false;
|
||||
disable_tools = ["node"];
|
||||
'';
|
||||
description = ''
|
||||
Settings written to {file}`$XDG_CONFIG_HOME/mise/settings.toml`.
|
||||
|
||||
See <https://mise.jdx.dev/configuration.html#settings-file-config-mise-settings-toml>
|
||||
See <https://mise.jdx.dev/configuration.html> and
|
||||
<https://mise.jdx.dev/configuration/settings.html>
|
||||
for details on supported values.
|
||||
'';
|
||||
};
|
||||
|
|
@ -109,10 +108,6 @@ in
|
|||
"mise/config.toml" = mkIf (cfg.globalConfig != { }) {
|
||||
source = tomlFormat.generate "mise-config" cfg.globalConfig;
|
||||
};
|
||||
|
||||
"mise/settings.toml" = mkIf (cfg.settings != { }) {
|
||||
source = tomlFormat.generate "mise-settings" cfg.settings;
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue