···4343 ];
44444545 home.activation.krispPatcher = lib.hm.dag.entryAfter [ "installPackages" ] ''
4646- already_patched=false
4746 for node in "${config.xdg.configHome}/discord/"*"/modules/discord_krisp/discord_krisp.node"; do
4847 if [ ! -e "$node" ]; then continue; fi
4848+4949+ already_patched=false
49505051 run mkdir -p "$(dirname "/tmp/$node")"
5152 run cp "$node" "/tmp/$node"
···5657 run rm "/tmp/$node"
5758 already_patched=true
5859 fi
5959- done
60606161- if [ "$already_patched" = false ]; then
6262- discord_was_running=false
6363- if ${pkgs.procps}/bin/pgrep -f discord > /dev/null; then
6464- discord_was_running=true
6565- run ${pkgs.procps}/bin/pkill -f discord || true
6666- fi
6161+ if [ "$already_patched" = false ]; then
6262+ discord_was_running=false
6363+ if ${pkgs.procps}/bin/pgrep -f discord > /dev/null; then
6464+ discord_was_running=true
6565+ run ${pkgs.procps}/bin/pkill -f discord || true
6666+ fi
67676868- for node in "${config.xdg.configHome}/discord/"*"/modules/discord_krisp/discord_krisp.node"; do
6969- if [ ! -e "$node" ]; then continue; fi
7068 run cp "/tmp/$node" "$node"
7169 run rm "/tmp/$node"
7272- done
73707474- if [ "$discord_was_running" = true ]; then
7575- run ${discordPackage}/bin/discord > /dev/null 2>&1 &
7171+ if [ "$discord_was_running" = true ]; then
7272+ run ${discordPackage}/bin/discord > /dev/null 2>&1 &
7373+ fi
7674 fi
7777- fi
7575+ done
7876 '';
7977 };
8078}