mergiraf: add 'enable{Git,Jujutsus}Integration'
This commit is contained in:
parent
32f78141a9
commit
d7ef0034e3
6 changed files with 142 additions and 18 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
mergiraf-basic-configuration = ./basic-configuration.nix;
|
||||
mergiraf-git-integration = ./git-integration.nix;
|
||||
mergiraf-jujutsu-integration = ./jujutsu-integration.nix;
|
||||
mergiraf-legacy-warnings = ./legacy-warnings.nix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
{
|
||||
programs.git.enable = true;
|
||||
programs.mergiraf.enable = true;
|
||||
programs.mergiraf = {
|
||||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
# Do not warn about default value
|
||||
enableJujutsuIntegration = false;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent "home-files/.config/git/config" ${./mergiraf-git.conf}
|
||||
|
|
@ -20,12 +20,20 @@ in
|
|||
enable = true;
|
||||
package = config.lib.test.mkStubPackage { };
|
||||
};
|
||||
programs.mergiraf.enable = true;
|
||||
programs.mergiraf = {
|
||||
enable = true;
|
||||
enableJujutsuIntegration = true;
|
||||
# Do not warn about default value
|
||||
enableGitIntegration = false;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists 'home-files/${configDir}/jj/config.toml'
|
||||
assertFileContent 'home-files/${configDir}/jj/config.toml' \
|
||||
${builtins.toFile "expected.toml" ''
|
||||
[merge-tools.mergiraf]
|
||||
program = "@mergiraf@/bin/mergiraf"
|
||||
|
||||
[ui]
|
||||
merge-editor = "mergiraf"
|
||||
''}
|
||||
|
|
|
|||
20
tests/modules/programs/mergiraf/legacy-warnings.nix
Normal file
20
tests/modules/programs/mergiraf/legacy-warnings.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
programs.mergiraf = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
test.asserts.warnings.expected = [
|
||||
''
|
||||
The default value of `programs.mergiraf.enableGitIntegration` will change in future versions.
|
||||
You are currently using the legacy default (true) because `home.stateVersion` is less than "26.05".
|
||||
To silence this warning set:
|
||||
programs.mergiraf.enableGitIntegration = true;
|
||||
''
|
||||
''
|
||||
The default value of `programs.mergiraf.enableJujutsuIntegration` will change in future versions.
|
||||
You are currently using the legacy default (true) because `home.stateVersion` is less than "26.05".
|
||||
To silence this warning set:
|
||||
programs.mergiraf.enableJujutsuIntegration = true;
|
||||
''
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue