86 lines
1.9 KiB
Nix
86 lines
1.9 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
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 [
|
|
{
|
|
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;
|
|
};
|
|
};
|
|
})
|
|
# (lib.mkIf (config.me.graphical) {
|
|
# nixpkgs.overlays = [
|
|
# (final: prev: {
|
|
# git = pkgs.buildEnv {
|
|
# name = prev.git.name;
|
|
# paths = [
|
|
# prev.git
|
|
# ];
|
|
# extraOutputsToInstall = [
|
|
# "man"
|
|
# "doc"
|
|
# "info"
|
|
# ];
|
|
# buildInputs = [ final.makeWrapper ];
|
|
# postBuild = ''
|
|
# wrapProgram $out/bin/git --prefix PATH : ${
|
|
# lib.makeBinPath [
|
|
# final.meld
|
|
# ]
|
|
# }
|
|
# '';
|
|
# };
|
|
# })
|
|
# ];
|
|
# })
|
|
# (lib.mkIf (!config.me.graphical) {
|
|
# nixpkgs.overlays = [
|
|
# (final: prev: {
|
|
# git = pkgs.buildEnv {
|
|
# name = prev.git.name;
|
|
# paths = [
|
|
# prev.git
|
|
# ];
|
|
# extraOutputsToInstall = [
|
|
# "man"
|
|
# "doc"
|
|
# "info"
|
|
# ];
|
|
# buildInputs = [ final.makeWrapper ];
|
|
# postBuild = ''
|
|
# wrapProgram $out/bin/git --prefix PATH : ${
|
|
# lib.makeBinPath [
|
|
# ]
|
|
# }
|
|
# '';
|
|
# };
|
|
# })
|
|
# ];
|
|
# })
|
|
];
|
|
}
|