From: Patrick Date: Tue, 3 Jun 2025 12:56:04 +0000 (+0200) Subject: add git-hook script that automatically updates git hooks X-Git-Url: https://gitweb.ps.run/flake_server/commitdiff_plain/41d783410776432d00c1bc38d41fdd482417af87 add git-hook script that automatically updates git hooks --- diff --git a/configuration.nix b/configuration.nix index 9bfd10c..17e1a4c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -101,6 +101,21 @@ senc = "sudo ${pkgs.helix}/bin/hx /etc/nixos/configuration.nix"; }; + # git-hooks + system.activationScripts.githook = + let + githooksRepo = pkgs.fetchgit { + url = "git://psch.dev/git-hooks"; + rev = "1071cff3ca2626dca967eb0989c0874764c460e2"; + hash = "sha256-dvTchTWvIlsqkU+iYm11kVTPr2B2LrCAdhZkmOoLRzA="; + }; + in + { + text = '' + PATH=$PATH:${lib.makeBinPath [ pkgs.git pkgs.sudo pkgs.python3 ]} sudo -u git ${githooksRepo}/git-hooks/post-receive + ''; + }; + # git users.users.git = { isSystemUser = true;