lol

sourcehut: fix up some more bin paths

Signed-off-by: Christoph Heiss <christoph@c8h4.io>

authored by

Christoph Heiss and committed by
Christoph Heiss
6b25e09d 5841d274

+9 -8
+9 -8
nixos/modules/services/misc/sourcehut/default.nix
··· 408 408 This setting is propagated to newer and existing repositories. 409 409 ''; 410 410 type = types.str; 411 - default = "${cfg.python}/bin/hgsrht-hook-changegroup"; 412 - defaultText = "\${cfg.python}/bin/hgsrht-hook-changegroup"; 411 + default = "${pkgs.sourcehut.hgsrht}/bin/hgsrht-hook-changegroup"; 412 + defaultText = "\${pkgs.sourcehut.hgsrht}/bin/hgsrht-hook-changegroup"; 413 413 }; 414 414 repos = mkOption { 415 415 description = lib.mdDoc '' ··· 795 795 environment.etc."ssh/sourcehut/subdir/srht-dispatch" = { 796 796 # sshd_config(5): The program must be owned by root, not writable by group or others 797 797 mode = "0755"; 798 - source = pkgs.writeShellScript "srht-dispatch" '' 798 + source = pkgs.writeShellScript "srht-dispatch-wrapper" '' 799 799 set -e 800 + set -x 800 801 cd /etc/ssh/sourcehut/subdir 801 - ${cfg.python}/bin/gitsrht-dispatch "$@" 802 + ${pkgs.sourcehut.gitsrht}/bin/gitsrht-dispatch "$@" 802 803 ''; 803 804 }; 804 805 systemd.services.sshd = { ··· 882 883 set -e 883 884 test -e "''$PWD"/config.ini || 884 885 ln -s /run/sourcehut/hgsrht/config.ini "''$PWD"/config.ini 885 - exec -a "$0" ${cfg.python}/bin/hgsrht-hook-changegroup "$@" 886 + exec -a "$0" ${pkgs.sourcehut.hgsrht}/bin/hgsrht-hook-changegroup "$@" 886 887 ''}:/usr/bin/hgsrht-hook-changegroup" 887 888 ]; 888 889 }; ··· 1195 1196 extraServices.listssrht-lmtp = { 1196 1197 wants = [ "postfix.service" ]; 1197 1198 unitConfig.JoinsNamespaceOf = optional cfg.postfix.enable "postfix.service"; 1198 - serviceConfig.ExecStart = "${cfg.python}/bin/listssrht-lmtp"; 1199 + serviceConfig.ExecStart = "${pkgs.sourcehut.listssrht}/bin/listssrht-lmtp"; 1199 1200 # Avoid crashing: os.chown(sock, os.getuid(), sock_gid) 1200 1201 serviceConfig.PrivateUsers = mkForce false; 1201 1202 }; ··· 1274 1275 else 1275 1276 # In order to load config.ini 1276 1277 if cd /run/sourcehut/metasrht 1277 - then exec ${cfg.python}/bin/metasrht-manageuser "$@" 1278 + then exec ${pkgs.sourcehut.metasrht}/bin/metasrht-manageuser "$@" 1278 1279 else cat <<EOF 1279 1280 Please run: sudo systemctl start metasrht 1280 1281 EOF ··· 1338 1339 extraServices.todosrht-lmtp = { 1339 1340 wants = [ "postfix.service" ]; 1340 1341 unitConfig.JoinsNamespaceOf = optional cfg.postfix.enable "postfix.service"; 1341 - serviceConfig.ExecStart = "${cfg.python}/bin/todosrht-lmtp"; 1342 + serviceConfig.ExecStart = "${pkgs.sourcehut.todosrht}/bin/todosrht-lmtp"; 1342 1343 # Avoid crashing: os.chown(sock, os.getuid(), sock_gid) 1343 1344 serviceConfig.PrivateUsers = mkForce false; 1344 1345 };