2019-10-08 22:46:27 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
2018-12-11 00:51:48 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
2019-10-08 22:46:27 +02:00
|
|
|
package = pkgs.gitMinimal;
|
2018-12-11 00:51:48 +01:00
|
|
|
extraConfig = ''
|
|
|
|
This can be anything.
|
|
|
|
'';
|
|
|
|
userEmail = "user@example.org";
|
|
|
|
userName = "John Doe";
|
|
|
|
};
|
|
|
|
|
2020-12-30 17:20:47 +01:00
|
|
|
test.asserts.warnings.expected = [''
|
|
|
|
Using programs.git.extraConfig as a string option is
|
|
|
|
deprecated and will be removed in the future. Please
|
|
|
|
change to using it as an attribute set instead.
|
|
|
|
''];
|
|
|
|
|
2018-12-11 00:51:48 +01:00
|
|
|
nmt.script = ''
|
|
|
|
assertFileExists home-files/.config/git/config
|
|
|
|
assertFileContent home-files/.config/git/config \
|
|
|
|
${./git-with-str-extra-config-expected.conf}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|