diff --git a/modules/home/default.nix b/modules/home/default.nix index c063724..b50ee95 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,6 +1,7 @@ { imports = [ ./fish.nix + ./git.nix ./neovim.nix ]; } diff --git a/modules/home/git.nix b/modules/home/git.nix new file mode 100644 index 0000000..e6da12c --- /dev/null +++ b/modules/home/git.nix @@ -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; + }; + } + ); +}