move git to own mod

This commit is contained in:
müde 2026-05-01 23:43:24 +02:00
parent 29ab335879
commit c2aa932494
5 changed files with 32 additions and 17 deletions

24
nixosModules/git.nix Normal file
View 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";
};
};
};
};
}