Skip to content

Git

programs.git.config

Configuration to write to /etc/gitconfig. A list can also be specified to keep the configuration in order. For example, setting config to [ { foo.x = 42; } { bar.y = 42; }] will put the foo section before the bar section unlike the default alphabetical order, which can be helpful for sections such as include and includeIf. See the CONFIGURATION FILE section of git-config(1) for more information.

Type: (attribute set of attribute set of anything) or list of attribute set of attribute set of anything

Default

[ ]

Example

{init = {defaultBranch = "main";};url = {"https://github.com/" = {insteadOf = ["gh:""github:"];};};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/programs/git.nix

programs.git.enable

Whether to enable git, a distributed version control system. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/programs/git.nix

programs.git.lfs.enable

Whether to enable git-lfs (Large File Storage). Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/programs/git.nix

programs.git.lfs.package

The git-lfs package to use. Type: package

Default

pkgs.git-lfs

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/programs/git.nix

programs.git.package

The git package to use. Type: package

Default

pkgs.git

Example

gitFull

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/programs/git.nix

programs.git.prompt.enable

Whether to enable automatically sourcing git-prompt.sh. This does not change $PS1; it simply provides relevant utility functions. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/programs/git.nix