mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add ssh-agent configuration and enable service on user install
This commit is contained in:
@@ -27,3 +27,6 @@ env = XCOMPOSEFILE,~/.XCompose
|
|||||||
ecosystem {
|
ecosystem {
|
||||||
no_update_news = true
|
no_update_news = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ssh-agent
|
||||||
|
env = SSH_AUTH_SOCK,$XDG_RUNTIME_DIR/ssh-agent.socket
|
||||||
@@ -7,6 +7,7 @@ run_logged $OMARCHY_INSTALL/config/timezones.sh
|
|||||||
run_logged $OMARCHY_INSTALL/config/increase-sudo-tries.sh
|
run_logged $OMARCHY_INSTALL/config/increase-sudo-tries.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/increase-lockout-limit.sh
|
run_logged $OMARCHY_INSTALL/config/increase-lockout-limit.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/ssh-flakiness.sh
|
run_logged $OMARCHY_INSTALL/config/ssh-flakiness.sh
|
||||||
|
run_logged $OMARCHY_INSTALL/config/ssh-agent.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/detect-keyboard-layout.sh
|
run_logged $OMARCHY_INSTALL/config/detect-keyboard-layout.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/xcompose.sh
|
run_logged $OMARCHY_INSTALL/config/xcompose.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/mise-ruby.sh
|
run_logged $OMARCHY_INSTALL/config/mise-ruby.sh
|
||||||
|
|||||||
23
install/config/ssh-agent.sh
Normal file
23
install/config/ssh-agent.sh
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# add ssh keys to ssh-agent
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo 'AddKeysToAgent yes' | tee ~/.ssh/config >/dev/null
|
||||||
|
|
||||||
|
# Create systemd service for ssh-agent
|
||||||
|
mkdir -p ~/.config/systemd/user
|
||||||
|
tee ~/.config/systemd/user/ssh-agent.service >/dev/null <<EOF
|
||||||
|
[Unit]
|
||||||
|
Description=SSH key agent
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||||
|
# DISPLAY required for ssh-askpass to work
|
||||||
|
Environment=DISPLAY=:0
|
||||||
|
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Start ssh-agent automatically for user
|
||||||
|
sudo systemctl enable --user ssh-agent.service
|
||||||
Reference in New Issue
Block a user