finished switching to modules

This commit is contained in:
Gerg-L 2023-02-22 19:09:11 -05:00
parent 99e7bf43e3
commit 87ca412366
12 changed files with 172 additions and 144 deletions

35
modules/git.nix Normal file
View file

@ -0,0 +1,35 @@
_: {
pkgs,
options,
config,
lib,
...
}:
with lib; let
cfg = config.localModules.git;
in {
options.localModules.git = {
disable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf (! cfg.disable) {
programs.git = {
enable = true;
package = pkgs.gitMinimal;
config = {
user = {
name = "Gerg-L";
email = "GregLeyda@proton.me";
};
init = {
defaultBranch = "master";
};
push = {
autoSetupRemote = true;
};
};
};
};
}