1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00
home-manager/tests/modules/programs/jujutsu/example-config.nix
Milo Moisson ea72cf548f
jujutsu: support darwin guidelines for config placement
Follow up to #5207, fixing jujutsu module on darwin targets.
2024-07-28 22:54:29 +02:00

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"
''
}
'';
}