mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-31 17:20:03 +00:00
Allow programs.git.settings to keep its existing attrset shorthand while also accepting an ordered list of fragments for repeated sections and order-sensitive config. Cover the new list form with a focused Git config snapshot test.
25 lines
520 B
Nix
25 lines
520 B
Nix
{ pkgs, ... }:
|
|
{
|
|
programs.git = {
|
|
enable = true;
|
|
package = pkgs.gitMinimal;
|
|
signing.format = null;
|
|
settings = [
|
|
{
|
|
credential."https://example.com".helper = "";
|
|
}
|
|
{
|
|
credential."https://example.com".helper = "oauth";
|
|
}
|
|
{
|
|
credential.helper = "store";
|
|
}
|
|
];
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/git/config
|
|
assertFileContent home-files/.config/git/config ${./git-settings-ordered-fragments-expected.conf}
|
|
'';
|
|
}
|