2.home-manager/tests/modules/programs/jujutsu/example-config.nix
Matthieu Coudron da624eaad0
jujutsu: evaluate the settings after merging with other options (#6775)
* jujutsu: evaluate the settings after merging with other options

* jujutsu: add ediff to the test
2025-04-11 10:34:17 +02:00

32 lines
835 B
Nix

{ pkgs, config, ... }:
let
configDir = if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
in
{
programs.jujutsu = {
enable = true;
package = config.lib.test.mkStubPackage { };
ediff = true;
settings = {
user = {
name = "John Doe";
email = "jdoe@example.org";
};
};
};
nmt.script = ''
assertFileExists 'home-files/${configDir}/jj/config.toml'
assertFileContent $(normalizeStorePaths 'home-files/${configDir}/jj/config.toml') \
${builtins.toFile "expected.toml" ''
[merge-tools.ediff]
merge-args = ["$left", "$right", "$base", "$output"]
program = "/nix/store/00000000000000000000000000000000-emacs-ediff/bin/emacs-ediff"
[user]
email = "jdoe@example.org"
name = "John Doe"
''}
'';
}