Add xdg settings, cache, cleanup script
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
{ user ? throw "user argument is required" }: { pkgs, ... }:
|
||||
{ user ? throw "user argument is required" }: { config, pkgs, ... }:
|
||||
|
||||
{
|
||||
let
|
||||
hmConfig = config.home-manager.users."${user.name}";
|
||||
in {
|
||||
home-manager.users."${user.name}" = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
@@ -14,7 +16,7 @@
|
||||
extraConfig.credential.helper = "store";
|
||||
hooks = let
|
||||
commit-msg-hook = pkgs.writeShellScriptBin "git-commit-msg" ''
|
||||
git interpret-trailers --if-exists doNothing --trailer \
|
||||
${pkgs.git}/bin/git interpret-trailers --if-exists doNothing --trailer \
|
||||
"Signed-off-by: $(git config user.name) <$(git config user.email)>" \
|
||||
--in-place "$1"
|
||||
'';
|
||||
@@ -22,5 +24,7 @@
|
||||
commit-msg = "${commit-msg-hook}/bin/git-commit-msg";
|
||||
};
|
||||
};
|
||||
|
||||
sops.secrets."git".path = "${hmConfig.xdg.configHome}/git/credentials";
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user