nixos-systems/modules/home/git.nix
Eli Ribble 6dc2fc4e44 Add git home module
Allows me to avoid configuring my name any time I want to use git
2025-07-21 18:47:02 +00:00

20 lines
403 B
Nix

{ 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;
};
}
);
}