File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 56
56
make-git = import ./git ;
57
57
controlling = import ./controlling ;
58
58
} ;
59
+ nixosModules . git =
60
+ {
61
+ config ,
62
+ pkgs ,
63
+ lib ,
64
+ ...
65
+ } :
66
+ let cfg = config . active-group . git ;
67
+ in
68
+ {
69
+ options . active-group . git = {
70
+ enable = lib . mkEnableOption "git" ;
71
+ userName = lib . mkOption {
72
+ type = lib . types . nonEmptyStr ;
73
+ } ;
74
+ userEmail = lib . mkOption {
75
+ type = lib . types . nonEmptyStr ;
76
+ } ;
77
+ } ;
78
+ config = lib . mkIf cfg . enable {
79
+ programs . git = {
80
+ enable = true ;
81
+ userName = cfg . userName ;
82
+ userEmail = cfg . userEmail ;
83
+ ignores = [
84
+ ".DS_Store"
85
+ "*~"
86
+ "\\ #*\\ #"
87
+ ".\\ #*"
88
+ ] ;
89
+ extraConfig = {
90
+ core . askPass = "" ;
91
+ init . defaultBranch = "main" ;
92
+ submodule . recurse = true ;
93
+ pull . rebase = false ;
94
+ } ;
95
+ } ;
96
+ } ;
97
+ } ;
98
+
59
99
} ;
60
100
} ;
61
101
}
You can’t perform that action at this time.
0 commit comments