jujutsu: add module

This commit is contained in:
William Phetsinorath 2023-01-27 22:15:17 +01:00 committed by Robert Helgesson
parent f2d6291150
commit c4f3a37071
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
8 changed files with 130 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{
jujutsu-example-config = ./example-config.nix;
jujutsu-empty-config = ./empty-config.nix;
}

View file

@ -0,0 +1,11 @@
{ ... }:
{
programs.jujutsu.enable = true;
test.stubs.jujutsu = { };
nmt.script = ''
assertPathNotExists home-files/.jjconfig.toml
'';
}

View file

@ -0,0 +1,27 @@
{ config, ... }:
{
programs.jujutsu = {
enable = true;
package = config.lib.test.mkStubPackage { };
settings = {
user = {
name = "John Doe";
email = "jdoe@example.org";
};
};
};
nmt.script = ''
assertFileExists home-files/.jjconfig.toml
assertFileContent \
home-files/.jjconfig.toml \
${
builtins.toFile "expected.toml" ''
[user]
email = "jdoe@example.org"
name = "John Doe"
''
}
'';
}