move git to own mod
This commit is contained in:
parent
29ab335879
commit
c2aa932494
5 changed files with 32 additions and 17 deletions
24
nixosModules/git.nix
Normal file
24
nixosModules/git.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.my.git.enable = lib.mkEnableOption "git with credential helper";
|
||||
|
||||
config = lib.mkIf config.my.git.enable {
|
||||
environment.systemPackages = [ pkgs.git-credential-oauth ];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
init.defaultBranch = "main";
|
||||
credential = {
|
||||
helper = "oauth";
|
||||
credentialStore = "cache";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue