Reorganize imports

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-12-21 23:32:29 +02:00
parent 0ae56e6e25
commit 98ce774210
189 changed files with 253 additions and 260 deletions

View File

@@ -0,0 +1,3 @@
git interpret-trailers --if-exists doNothing --trailer \
"Signed-off-by: $(git config user.name) <$(git config user.email)>" \
--in-place "$1"

View File

@@ -0,0 +1,47 @@
{
user ? throw "user argument is required",
home ? throw "home argument is required",
}:
{
config,
lib,
pkgs,
...
}:
let
userConfig = config.users.users.${user};
in
{
home-manager.users.${user} = {
programs.git = {
enable = true;
lfs.enable = true;
userName = userConfig.fullName;
userEmail = userConfig.email;
signing = {
signByDefault = true;
key = null;
};
extraConfig = {
credential.helper = "store";
push.autoSetupRemote = true;
core.fsmonitor = true;
feature.manyFiles = true;
fetch.writeCommitGraph = true;
http.cookiefile = "${home}/.config/git/cookies";
};
hooks = {
commit-msg = lib.meta.getExe (
pkgs.writeShellApplication {
name = "git-commit-msg-hook";
runtimeInputs = with pkgs; [ git ];
text = builtins.readFile ./commit-msg.sh;
}
);
};
};
};
}