mirror of
https://github.com/nix-community/home-manager
synced 2024-11-01 16:59:43 +01:00
ea72cf548f
Follow up to #5207, fixing jujutsu module on darwin targets.
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"
|
|
''
|
|
}
|
|
'';
|
|
}
|