From 3b52a825e5b64f53313ef54ed1a832a84986fac8 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 28 Oct 2025 16:46:54 +0100 Subject: ssh: use systemd to start the ssh-agent --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 01c2559..1e93252 100755 --- a/setup.py +++ b/setup.py @@ -43,6 +43,13 @@ def fish_config(quiet): subprocess.run(["fish", dir_path + "fisher.fish"]) +def enable_ssh_agent(quiet): + """enable the systemd ssh-agent unit for the user session""" + if not quiet: + print("Enabling ssh-agent user unit") + subprocess.run("systemctl --user enable ssh-agent.service", check=True) + + def vdirsyncer_init(quiet): """discover and sync""" if not quiet: @@ -129,8 +136,7 @@ targets = { [("bin/alert", local_bin_dir + "/alert"), ("bin/set_theme", local_bin_dir + "/set_theme")], "ssh": - [("ssh/config.gpg", home_dir + "/.ssh/config"), - ("ssh/ssh-agent.service", config_dir + "/systemd/user/ssh-agent.service")], + [("ssh/config.gpg", home_dir + "/.ssh/config"), enable_ssh_agent], "sway": [dotfile_loc_helper], "terminator": -- cgit v1.2.3