launchd: fix user domain agents
User-domain agents need the Background session type to bootstrap into user/501, and activation should fail rather than silently unloading services when launchctl bootstrap fails.
This commit is contained in:
parent
2a37d71bbe
commit
2f3da3d45f
30 changed files with 208 additions and 28 deletions
|
|
@ -4,6 +4,8 @@
|
|||
<dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.borgmatic</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.colima-default</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/bin/sh</string>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.colima-default</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/bin/sh</string>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.emacs</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/bin/sh</string>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
<dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.git-sync-test</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
serviceFile=$(normalizeStorePaths $serviceFile)
|
||||
assertFileExists "$serviceFile"
|
||||
assertFileContent "$serviceFile" ${./glance.plist}
|
||||
assertFileContains "$serviceFile" '<key>LimitLoadToSessionType</key>'
|
||||
assertFileContains "$serviceFile" '<string>Background</string>'
|
||||
|
||||
domainFile=LaunchAgentDomains/org.nix-community.home.glance.domain
|
||||
assertFileContent "$domainFile" ${builtins.toFile "expected-domain" "user\n"}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<true/>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.glance</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/bin/sh</string>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.gpg-agent</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
<dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.home-manager-auto-expire</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
<true/>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.imapnotify-hm-example.com</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
<dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.nix-gc</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>/bin/sh</string>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.ollama</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.podman-machine-podman-machine-default</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.podman-machine-dev-machine</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<true/>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.proton-pass-agent</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<true/>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.proton-pass-agent</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.ssh-agent</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.ssh-agent</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.ssh-agent</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.syncthing</string>
|
||||
<key>LimitLoadToSessionType</key>
|
||||
<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
</dict>
|
||||
<key>Label</key>
|
||||
<string>org.nix-community.home.yubikey-agent</string>
|
||||
${"\t"}<key>LimitLoadToSessionType</key>
|
||||
${"\t"}<string>Background</string>
|
||||
<key>ProcessType</key>
|
||||
<string>Background</string>
|
||||
<key>ProgramArguments</key>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue