Add git home module

Allows me to avoid configuring my name any time I want to use git
This commit is contained in:
Eli Ribble 2025-07-21 18:47:02 +00:00
parent 974bb922cb
commit 6dc2fc4e44
2 changed files with 21 additions and 0 deletions

View file

@ -1,6 +1,7 @@
{
imports = [
./fish.nix
./git.nix
./neovim.nix
];
}

20
modules/home/git.nix Normal file
View file

@ -0,0 +1,20 @@
{ config, configFiles, lib, pkgs, ... }:
with lib;
{
options.myModules.home.git = {
enable = mkEnableOption "custom git configuration";
};
config = mkIf config.myModules.home.git.enable (
let
configPath = (configFiles + "/users/${config.myModules.home.user}/gitconfig");
in {
# Use the correct Home Manager option
home.file.".gitconfig" = {
source = configPath;
};
}
);
}