diff options
author | Joachim F <joachifm@users.noreply.github.com> | 2018-05-31 13:43:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-31 13:43:27 +0000 |
commit | 83e3480686b4929496f240d534345fa37800b36c (patch) | |
tree | 1e92ad3b8a6dc4ad0b732c1e327c623e79bcfe18 | |
parent | 5e445b94f8327871987b9cca3e1dc7d32d33eae0 (diff) | |
parent | 28c20a4731da9d5ba539e2d1ef6bcf3ddf1026ac (diff) | |
download | nixlib-83e3480686b4929496f240d534345fa37800b36c.tar nixlib-83e3480686b4929496f240d534345fa37800b36c.tar.gz nixlib-83e3480686b4929496f240d534345fa37800b36c.tar.bz2 nixlib-83e3480686b4929496f240d534345fa37800b36c.tar.lz nixlib-83e3480686b4929496f240d534345fa37800b36c.tar.xz nixlib-83e3480686b4929496f240d534345fa37800b36c.tar.zst nixlib-83e3480686b4929496f240d534345fa37800b36c.zip |
Merge pull request #41218 from Gerschtli/fix/gitea-pre-start
nixos/gitea: fix pre start script
-rw-r--r-- | nixos/modules/services/misc/gitea.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index 2d0f66de037d..45dfdc71eb36 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -282,7 +282,7 @@ in mkdir -p ${cfg.repositoryRoot} # update all hooks' binary paths - HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 4 -type f -wholename "*git/hooks/*") + HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 5 -type f -wholename "*git/hooks/*") if [ "$HOOKS" ] then sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' $HOOKS @@ -295,6 +295,11 @@ in mkdir -p ${cfg.stateDir}/conf cp -r ${gitea.out}/locale ${cfg.stateDir}/conf/locale fi + # update command option in authorized_keys + if [ -r ${cfg.stateDir}/.ssh/authorized_keys ] + then + sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' ${cfg.stateDir}/.ssh/authorized_keys + fi '' + optionalString (usePostgresql && cfg.database.createDatabase) '' if ! test -e "${cfg.stateDir}/db-created"; then echo "CREATE ROLE ${cfg.database.user} |