[Add] systemd log wrapper to nix flake

This commit is contained in:
Alois 2026-05-17 19:30:11 +02:00
commit 045e2ff15c

View file

@ -178,13 +178,14 @@
ExecStart = if cfg.useTmux then ExecStart = if cfg.useTmux then
pkgs.writeShellScript "iota-start" '' pkgs.writeShellScript "iota-start" ''
${pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/tmux.sock new-session -d -s iota ${cfg.package}/bin/iota ${pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/tmux.sock new-session -d -s iota \
'${cfg.package}/bin/iota 2>&1 | ${pkgs.systemd}/bin/systemd-cat -t iota-daemon'
while ${pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/tmux.sock has-session -t iota 2>/dev/null; do while ${pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/tmux.sock has-session -t iota 2>/dev/null; do
sleep 2 sleep 2
done done
'' ''
else else
"${cfg.package}/bin/iota"; "${pkgs.systemd}/bin/systemd-cat -t iota-daemon ${cfg.package}/bin/iota";
ExecStartPre = [ ExecStartPre = [
("+" + pkgs.writeShellScript "iota-setup" '' ("+" + pkgs.writeShellScript "iota-setup" ''