1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 13:39:46 +01:00
home-manager/tests/modules/programs/jujutsu/example-config.nix

30 lines
640 B
Nix
Raw Normal View History

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