forked from aylac.top/nixcfg
this repo has no description
at main 911 B view raw
1{ 2 lib, 3 config, 4 pkgs, 5 ... 6}: { 7 options.myHome.programs.git.enable = lib.mkEnableOption "git version control"; 8 9 config = lib.mkIf config.myHome.programs.git.enable { 10 programs.git = { 11 enable = true; 12 signing = { 13 format = "ssh"; 14 key = "~/.ssh/id_ed25519"; 15 signByDefault = true; 16 }; 17 settings = { 18 inherit (config.mySnippets.git) user; 19 color.ui = true; 20 github.user = "ayla6"; 21 init = { 22 defaultBranch = "main"; 23 }; 24 push = { 25 autoSetupRemote = true; 26 default = "current"; 27 }; 28 credential = { 29 helper = lib.getExe pkgs.git-credential-manager; 30 credentialStore = 31 if config.myHome.desktop.enable 32 then "secretservice" 33 else "pgp"; 34 "https://git.aylac.top".provider = "generic"; 35 }; 36 }; 37 }; 38 }; 39}