Files
home-manager/tests/modules/programs/git/git-settings-ordered-fragments.nix
Austin Horstman 30db803c98 git: support ordered settings fragments
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.
2026-04-23 12:13:58 -05:00

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