my nixos/home-manager configuration
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(home-manager): do not use exit or return in activation scripts

this skipped linkage step and home.file were not created

youn 6eb61902 9c2da2f4

+17 -19
+17 -19
home-manager/modules/discord.nix
··· 51 51 for node in "${config.xdg.configHome}/discord/"*"/modules/discord_krisp/discord_krisp.node"; do 52 52 if [ ! -e "$node" ]; then continue; fi 53 53 54 - mkdir -p "$(dirname "/tmp/$node")" 55 - cp "$node" "/tmp/$node" 54 + run mkdir -p "$(dirname "/tmp/$node")" 55 + run cp "$node" "/tmp/$node" 56 56 57 57 command=$(run ${krisp-patcher}/bin/krisp-patcher "/tmp/$node") 58 58 59 59 if [ "$command" = "Couldn't find patch location - already patched." ]; then 60 - rm "/tmp/$node" 60 + run rm "/tmp/$node" 61 61 already_patched=true 62 62 fi 63 63 done 64 64 65 - if [ "$already_patched" = true ]; then 66 - exit 0 67 - fi 68 - 69 - discord_was_running=false 70 - if ${pkgs.procps}/bin/pgrep -f discord > /dev/null; then 71 - discord_was_running=true 72 - run ${pkgs.procps}/bin/pkill -f discord || true 73 - fi 65 + if [ "$already_patched" = false ]; then 66 + discord_was_running=false 67 + if ${pkgs.procps}/bin/pgrep -f discord > /dev/null; then 68 + discord_was_running=true 69 + run ${pkgs.procps}/bin/pkill -f discord || true 70 + fi 74 71 75 - for node in "${config.xdg.configHome}/discord/"*"/modules/discord_krisp/discord_krisp.node"; do 76 - if [ ! -e "$node" ]; then continue; fi 77 - run cp "/tmp/$node" "$node" 78 - rm "/tmp/$node" 79 - done 72 + for node in "${config.xdg.configHome}/discord/"*"/modules/discord_krisp/discord_krisp.node"; do 73 + if [ ! -e "$node" ]; then continue; fi 74 + run cp "/tmp/$node" "$node" 75 + run rm "/tmp/$node" 76 + done 80 77 81 - if [ "$discord_was_running" = true ]; then 82 - run ${discordPackage}/bin/discord > /dev/null 2>&1 & 78 + if [ "$discord_was_running" = true ]; then 79 + run ${discordPackage}/bin/discord > /dev/null 2>&1 & 80 + fi 83 81 fi 84 82 ''; 85 83 };