Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions modules/services/proton-pass-agent.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ in
};
Service = {
ExecStart = lib.concatStringsSep " " cmd;
Restart = "on-failure";
KeyringMode = "shared";
};
};
Expand All @@ -105,11 +106,7 @@ in
"-c"
(lib.concatStringsSep " " cmd)
];
KeepAlive = {
Crashed = true;
SuccessfulExit = false;
};
ProcessType = "Background";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it still be preferred to stay Background this will adjust how macOS handles the resources better as a background daemon.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially, I thought that too, but as a background service, it often stopped running when I reopened the lid or after waking up from sleep/suspend. Declaring it as a normal service resolves these issues.

KeepAlive = true;
RunAtLoad = true;
StandardOutPath = "${config.home.homeDirectory}/Library/Logs/Proton Pass CLI/ssh-agent-stdout.log";
StandardErrorPath = "${config.home.homeDirectory}/Library/Logs/Proton Pass CLI/ssh-agent-stderr.log";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<true/>
<key>SuccessfulExit</key>
<false/>
</dict>
<true/>
<key>Label</key>
<string>org.nix-community.home.proton-pass-agent</string>
<key>ProcessType</key>
<string>Background</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WantedBy=default.target
[Service]
ExecStart=@proton-pass-cli@/bin/pass-cli ssh-agent start --socket-path %t/proton-pass-agent/socket
KeyringMode=shared
Restart=on-failure

[Unit]
Description=Proton Pass SSH agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<dict>
<key>Crashed</key>
<true/>
<key>SuccessfulExit</key>
<false/>
</dict>
<true/>
<key>Label</key>
<string>org.nix-community.home.proton-pass-agent</string>
<key>ProcessType</key>
<string>Background</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WantedBy=default.target
[Service]
ExecStart=@proton-pass-cli@/bin/pass-cli ssh-agent start --socket-path %t/proton-pass-agent/socket --share-id 123456789 --vault-name MySshKeyVault --refresh-interval 7200 --create-new-identities MySshKeyVault
KeyringMode=shared
Restart=on-failure

[Unit]
Description=Proton Pass SSH agent
Expand Down
Loading