mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-30 16:10:45 +00:00
proton-pass-agent: retry systemd service instead of hitting start limit
The agent exits as long as no valid pass-cli session exists. With the default start rate limit systemd stopped restarting it after a few attempts, leaving the unit dead until it was restarted manually. Disable the rate limit and retry every 10 seconds so the agent starts on its own after 'pass-cli login'.
This commit is contained in:
committed by
Austin Horstman
parent
7e1b482b1e
commit
fc0923ff94
@@ -94,10 +94,15 @@ in
|
||||
Unit = {
|
||||
Description = "Proton Pass SSH agent";
|
||||
Documentation = "https://protonpass.github.io/pass-cli/commands/ssh-agent/#ssh-agent-integration";
|
||||
# Retry forever: the agent exits as long as `pass-cli login` has not
|
||||
# been run, which would otherwise exhaust systemd's start rate limit
|
||||
# and leave the unit dead until it is restarted manually.
|
||||
StartLimitIntervalSec = 0;
|
||||
};
|
||||
Service = {
|
||||
ExecStart = lib.concatStringsSep " " cmd;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 10;
|
||||
KeyringMode = "shared";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -5,7 +5,9 @@ WantedBy=default.target
|
||||
ExecStart=@proton-pass-cli@/bin/pass-cli ssh-agent start --socket-path %t/proton-pass-agent/socket
|
||||
KeyringMode=shared
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Unit]
|
||||
Description=Proton Pass SSH agent
|
||||
Documentation=https://protonpass.github.io/pass-cli/commands/ssh-agent/#ssh-agent-integration
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
@@ -5,7 +5,9 @@ WantedBy=default.target
|
||||
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
|
||||
RestartSec=10
|
||||
|
||||
[Unit]
|
||||
Description=Proton Pass SSH agent
|
||||
Documentation=https://protonpass.github.io/pass-cli/commands/ssh-agent/#ssh-agent-integration
|
||||
StartLimitIntervalSec=0
|
||||
|
||||
Reference in New Issue
Block a user