2024-07-28 20:54:29 +00:00
|
|
|
{ pkgs, config, ... }:
|
2023-01-27 21:15:17 +00:00
|
|
|
|
2024-07-28 20:54:29 +00:00
|
|
|
let
|
|
|
|
configDir =
|
|
|
|
if pkgs.stdenv.isDarwin then "Library/Application Support" else ".config";
|
|
|
|
in {
|
2023-01-27 21:15:17 +00:00
|
|
|
programs.jujutsu = {
|
|
|
|
enable = true;
|
|
|
|
package = config.lib.test.mkStubPackage { };
|
|
|
|
settings = {
|
|
|
|
user = {
|
|
|
|
name = "John Doe";
|
|
|
|
email = "jdoe@example.org";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nmt.script = ''
|
2024-07-28 20:54:29 +00:00
|
|
|
assertFileExists 'home-files/${configDir}/jj/config.toml'
|
|
|
|
assertFileContent 'home-files/${configDir}/jj/config.toml' \
|
2023-01-27 21:15:17 +00:00
|
|
|
${
|
|
|
|
builtins.toFile "expected.toml" ''
|
|
|
|
[user]
|
|
|
|
email = "jdoe@example.org"
|
|
|
|
name = "John Doe"
|
|
|
|
''
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
}
|