Skip to content

feat(darwin): start MechvibesDX at login via a LaunchAgent - #185

Merged
gapul merged 1 commit into
mainfrom
feat/mechvibes-login-agent
Aug 9, 2026
Merged

feat(darwin): start MechvibesDX at login via a LaunchAgent#185
gapul merged 1 commit into
mainfrom
feat/mechvibes-login-agent

Conversation

@gapul

@gapul gapul commented Aug 9, 2026

Copy link
Copy Markdown
Owner

なにを

MechvibesDX をログイン時に起動する。System Settings のログイン項目ではなく LaunchAgent で、mopidy / ollama と同じ宣言の場所に置く。

#184 に後から足したコミットだが、あちらはオートマージが先に発火して先の1コミットだけで入ってしまったので、取り残された分をここに切り出した。

判断

  • $out/bin ではなくバンドル内の実行ファイルを叩く。macOS は実行ファイルの親ディレクトリからバンドルを判定するので、トレイアイコンとアクセシビリティのエントリはどちらもそこに依存する
  • --minimized を渡す。config の start_minimizedauto_start と併用でしか効かず、それは Windows レジストリ側の経路なので、フラグで渡すのが確実
  • KeepAlive なし。トレイから終了したら終了したままであるべきで、この完成度のアプリでクラッシュループする方が無音より悪い
  • ProcessType = "Interactive"。打鍵から音までのレイテンシがあるので、mopidy のエージェントと同じ扱いにする
  • パッケージは let で束縛し直した。home.packages と ProgramArguments が同じ store path を指す必要があるため

確認

nix eval .#homeConfigurations.gapul.activationPackage.drvPath 通過。agent の ProgramArguments がビルド済みの store path のバンドル実行ファイルを指していることも確認済み。

#184 の本文には検証として darwinConfigurations.gapul.system.drvPath を挙げていたが、このリポジトリでは home が別 output なのでそれは home 側を含んでいない。意味があるのは上記の方。)

Replaces a System Settings login item with the declarative equivalent, next
to the other resident agents.

Launched through the bundle's executable rather than $out/bin: macOS derives
the bundle from the executable's parent directories, and both the tray icon
and the Accessibility entry depend on it being seen as a real .app.

--minimized because the config's start_minimized only takes effect together
with auto_start, which is the Windows registry path. No KeepAlive - quitting
from the tray should stay quit, and a crash loop on an app this experimental
would be worse than no sound.
@gapul
gapul enabled auto-merge (squash) August 9, 2026 14:42
@gapul
gapul merged commit 47779d1 into main Aug 9, 2026
3 checks passed
@gapul
gapul deleted the feat/mechvibes-login-agent branch August 9, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant