Browse Source

ssh-agent as a systemd user service

nixos
Maxime Wack 4 years ago
parent
commit
a7cb841518
3 changed files with 13 additions and 3 deletions
  1. +11
    -0
      .config/systemd/user/ssh-agent.service
  2. +2
    -0
      .profile
  3. +0
    -3
      .xinitrc

+ 11
- 0
.config/systemd/user/ssh-agent.service View File

@@ -0,0 +1,11 @@
[Unit]
Description=ssh-agent

[Service]
Type=simple
Environment="SSH_AUTH_SOCK=%t/ssh-agent.socket"
Environment="SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass"
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK

[Install]
WantedBy=default.target

+ 2
- 0
.profile View File

@@ -13,3 +13,5 @@ export QT_IM_MODULE=ibus
export THETVDB_API_KEY=49B26BFAFD11B0F3
export TR_AUTH=":"
export PATH=$HOME/.config/bin:/usr/local/bin:$PATH
export SSH_AUTH_SOCK=${XDG_RUNTIME_DIR}/ssh-agent.socket
export SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass

+ 0
- 3
.xinitrc View File

@@ -14,7 +14,4 @@ fi

ibus-daemon -drx

eval $(ssh-agent)
export SSH_ASKPASS=/usr/lib/ssh/x11-ssh-askpass

exec ./.bspwm-session

Loading…
Cancel
Save