2024-12-20 22:37:44 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-12-20 13:12:27 -05:00
|
|
|
|
|
|
|
{
|
2024-12-20 22:37:44 -05:00
|
|
|
imports = [ ];
|
2024-12-20 13:12:27 -05:00
|
|
|
|
2025-01-23 19:55:13 -05:00
|
|
|
options.me = {
|
|
|
|
git.config = lib.mkOption {
|
|
|
|
type = lib.types.nullOr lib.types.path;
|
|
|
|
default = null;
|
|
|
|
example = ./files/gitconfig_home;
|
|
|
|
description = "A git config file.";
|
|
|
|
};
|
|
|
|
};
|
2024-12-20 13:12:27 -05:00
|
|
|
|
2025-01-23 19:55:13 -05:00
|
|
|
config = lib.mkMerge [
|
2024-12-20 22:37:44 -05:00
|
|
|
{
|
2025-01-23 19:55:13 -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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
)
|
|
|
|
];
|
2024-12-20 13:12:27 -05:00
|
|
|
}
|