Use lib.meta.getExe

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-25 20:16:42 +03:00
parent eaa63dd272
commit d9a3936d51
17 changed files with 141 additions and 133 deletions

View File

@@ -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}";
});
};
};