Merge pull request #129861 from vs49688/giteafix

modules/gitea: use gitea to refresh hooks and keys

authored by Aaron Andersen and committed by GitHub 7841f5f4 863a26e3

+2 -9
+2 -9
nixos/modules/services/misc/gitea.nix
··· 523 ''} 524 525 # update all hooks' binary paths 526 - HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*") 527 - if [ "$HOOKS" ] 528 - then 529 - sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea}/bin/gitea,g' $HOOKS 530 - sed -ri 's,/nix/store/[a-z0-9.-]+/bin/env,${pkgs.coreutils}/bin/env,g' $HOOKS 531 - sed -ri 's,/nix/store/[a-z0-9.-]+/bin/bash,${pkgs.bash}/bin/bash,g' $HOOKS 532 - sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS 533 - fi 534 535 # update command option in authorized_keys 536 if [ -r ${cfg.stateDir}/.ssh/authorized_keys ] 537 then 538 - sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea}/bin/gitea,g' ${cfg.stateDir}/.ssh/authorized_keys 539 fi 540 ''; 541
··· 523 ''} 524 525 # update all hooks' binary paths 526 + ${gitea}/bin/gitea admin regenerate hooks 527 528 # update command option in authorized_keys 529 if [ -r ${cfg.stateDir}/.ssh/authorized_keys ] 530 then 531 + ${gitea}/bin/gitea admin regenerate keys 532 fi 533 ''; 534