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
35
tests/modules/programs/mise/custom-settings-renamed.nix
Normal file
35
tests/modules/programs/mise/custom-settings-renamed.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs = {
|
||||
mise = {
|
||||
package = config.lib.test.mkStubPackage { name = "mise"; };
|
||||
enable = true;
|
||||
settings = {
|
||||
disable_tools = [ "node" ];
|
||||
experimental = true;
|
||||
verbose = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test.asserts.warnings.expected = [
|
||||
"The option `programs.mise.settings' defined in ${lib.showFiles options.programs.mise.settings.files} has been renamed to `programs.mise.globalConfig.settings'."
|
||||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/mise/config.toml
|
||||
|
||||
assertFileContent home-files/.config/mise/config.toml ${pkgs.writeText "mise.config.expected" ''
|
||||
[settings]
|
||||
disable_tools = ["node"]
|
||||
experimental = true
|
||||
verbose = false
|
||||
''}
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,10 +1,26 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs = {
|
||||
mise = {
|
||||
package = config.lib.test.mkStubPackage { name = "mise"; };
|
||||
enable = true;
|
||||
globalConfig = {
|
||||
settings = {
|
||||
disable_tools = [ "node" ];
|
||||
experimental = true;
|
||||
verbose = false;
|
||||
};
|
||||
|
||||
tool_alias = {
|
||||
node.versions = {
|
||||
my_custom_node = "20";
|
||||
};
|
||||
};
|
||||
|
||||
tools = {
|
||||
node = "lts";
|
||||
python = [
|
||||
|
|
@ -12,36 +28,25 @@
|
|||
"3.11"
|
||||
];
|
||||
};
|
||||
|
||||
aliases = {
|
||||
my_custom_node = "20";
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
verbose = false;
|
||||
experimental = true;
|
||||
disable_tools = [ "node" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/mise/config.toml
|
||||
assertFileExists home-files/.config/mise/settings.toml
|
||||
|
||||
assertFileContent home-files/.config/mise/config.toml ${pkgs.writeText "mise.config.expected" ''
|
||||
[aliases]
|
||||
[settings]
|
||||
disable_tools = ["node"]
|
||||
experimental = true
|
||||
verbose = false
|
||||
|
||||
[tool_alias.node.versions]
|
||||
my_custom_node = "20"
|
||||
|
||||
[tools]
|
||||
node = "lts"
|
||||
python = ["3.10", "3.11"]
|
||||
''}
|
||||
|
||||
assertFileContent home-files/.config/mise/settings.toml ${pkgs.writeText "mise.settings.expected" ''
|
||||
disable_tools = ["node"]
|
||||
experimental = true
|
||||
verbose = false
|
||||
''}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.config/mise/config.toml
|
||||
assertPathNotExists home-files/.config/mise/settings.toml
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
mise-default-settings = ./default-settings.nix;
|
||||
mise-custom-settings = ./custom-settings.nix;
|
||||
mise-custom-settings-renamed = ./custom-settings-renamed.nix;
|
||||
mise-bash-integration = ./bash-integration.nix;
|
||||
mise-zsh-integration = ./zsh-integration.nix;
|
||||
mise-fish-integration = ./fish-integration.nix;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue