39 lines
637 B
Nix
Raw Normal View History

2024-12-20 22:37:44 -05:00
{
config,
lib,
pkgs,
...
}:
{
2024-12-20 22:37:44 -05:00
imports = [ ];
options.me = {
git.config = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
example = ./files/gitconfig_home;
description = "A git config file.";
};
};
config = lib.mkMerge [
2024-12-20 22:37:44 -05:00
{
environment.systemPackages = with pkgs; [
git
];
}
(
lib.mkIf config.me.git.config != null {
home-manager.users.talexander =
{ pkgs, ... }:
{
home.file.".gitconfig" = {
source = config.me.git.config;
};
};
}
)
];
}