Use lib.meta.getExe
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ user ? throw "user argument is required" }: { config, pkgs, ... }:
|
||||
{ user ? throw "user argument is required" }: { config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
hmConfig = config.home-manager.users."${user.name}";
|
||||
@@ -22,12 +22,11 @@ in
|
||||
};
|
||||
|
||||
hooks = {
|
||||
commit-msg = let name = "git-commit-msg-hook"; in
|
||||
"${pkgs.writeShellApplication {
|
||||
inherit name;
|
||||
commit-msg = lib.meta.getExe (pkgs.writeShellApplication {
|
||||
name = "git-commit-msg-hook";
|
||||
runtimeInputs = with pkgs; [ git ];
|
||||
text = builtins.readFile ./commit-msg.sh;
|
||||
}}/bin/${name}";
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user