systemd: Add user ssh-agent unit

master
Taeyeon Mori 8 years ago
parent 4ed224d306
commit 33bcafe714
  1. 1
      config/systemd/user/default.target.wants/ssh-agent.service
  2. 13
      config/systemd/user/ssh-agent.service
  3. 8
      install

@ -0,0 +1,13 @@
[Unit]
Description=SSH publickey authentication agent
[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.sock
ExecStart=/usr/bin/ssh-agent -D -a ${SSH_AUTH_SOCK}
ExecStartPost=/usr/bin/systemctl --user set-environment SSH_AUTH_SOCK=${SSH_AUTH_SOCK}
ExecStopPre=/usr/bin/systemctl --user unset-environment SSH_AUTH_SOCK=${SSH_AUTH_SOCK}
[Install]
WantedBy=default.target

@ -102,12 +102,16 @@ msg "Linking .config files... ($XDG_CONFIG_HOME)"
mkdir "$XDG_CONFIG_HOME/$dir"
fi
done
for file in $(find . -type f); do
for file in $(find . -type f -o -type l); do
file="${file:2}"
color 32 echo " Adding $file"
if [[ -L "$file" ]]; then
cp "$file" "$XDG_CONFIG_HOME/$file"
else
relink "$DOT/config/$file" "$XDG_CONFIG_HOME/$file"
fi
done
);
)
# Setup git
msg "Setting up Git configuration..."

Loading…
Cancel
Save