2019-10-08 20:46:27 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2018-12-10 23:51:48 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
2019-10-08 20:46:27 +00:00
|
|
|
package = pkgs.gitMinimal;
|
2018-12-10 23:51:48 +00:00
|
|
|
extraConfig = ''
|
|
|
|
This can be anything.
|
|
|
|
'';
|
|
|
|
userEmail = "user@example.org";
|
|
|
|
userName = "John Doe";
|
|
|
|
};
|
|
|
|
|
2020-12-30 16:20:47 +00: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-10 23:51:48 +00:00
|
|
|
nmt.script = ''
|
|
|
|
assertFileExists home-files/.config/git/config
|
|
|
|
assertFileContent home-files/.config/git/config \
|
|
|
|
${./git-with-str-extra-config-expected.conf}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|