mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 13:39:46 +01:00
3288b74c61
Follow up to #5207, fixing jujutsu module on darwin targets.
(cherry picked from commit ea72cf548f
)
29 lines
640 B
Nix
29 lines
640 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 { };
|
|
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' \
|
|
${
|
|
builtins.toFile "expected.toml" ''
|
|
[user]
|
|
email = "jdoe@example.org"
|
|
name = "John Doe"
|
|
''
|
|
}
|
|
'';
|
|
}
|