this post was submitted on 10 Nov 2024
7 points (100.0% liked)

Nix / NixOS

1762 readers
13 users here now

Main links

Videos

founded 1 year ago
MODERATORS
 

I try to add an application that was installed with homebrew (managed by nix darwin) to the "Open at Login" settings under "General -> Login Items & Extensions".

I tried to add a launchd.user.agents entry, but that didn't work. The app is only adeded to the "Allow in the Background" settings and does not start on login.

  launchd.user.agents = {
    sanesidebuttons = {
      serviceConfig = {
        Label = "com.thealpa.sanesidebuttons";
        RunAtLoad = true;
        Program = "/Applications/SaneSideButtons.app";
      };
    };
  };

Any ideas how to add an entry to the "Open at Login" settings with nix darwin? launchd.agents and launchd.daemons seems to be the wrong place as well.

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 1 points 4 days ago (1 children)

As mentioned on Mastodon (https://mastodon.social/@[email protected]/113460954769241417) there seems to be no way to do it at the moment :(

[โ€“] [email protected] 1 points 2 days ago

I think there ought to be a way to do it, it's not going to be pretty (because you'll likely have to manually update some system file somewhere).