Add basic theme config

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-23 14:50:50 +03:00
parent 48f391e3ad
commit e7d328cab5
23 changed files with 554 additions and 188 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

@@ -2,7 +2,8 @@
let
hmConfig = config.home-manager.users."${user.name}";
in {
in
{
home-manager.users."${user.name}" = {
programs.git = {
enable = true;
@@ -14,14 +15,13 @@ in {
key = null;
};
extraConfig.credential.helper = "store";
hooks = let
commit-msg-hook = pkgs.writeShellScriptBin "git-commit-msg" ''
${pkgs.git}/bin/git interpret-trailers --if-exists doNothing --trailer \
"Signed-off-by: $(git config user.name) <$(git config user.email)>" \
--in-place "$1"
'';
in {
commit-msg = "${commit-msg-hook}/bin/git-commit-msg";
hooks = {
commit-msg = let name = "git-commit-msg-hook"; in
"${pkgs.writeShellApplication {
inherit name;
runtimeInputs = with pkgs; [ git ];
text = builtins.readFile ./commit-msg.sh;
}}/bin/${name}";
};
};