From b43657877c7f30b3d2d0ac4262aea9c3f916ccb8 Mon Sep 17 00:00:00 2001 From: Toast Date: Wed, 27 Mar 2024 12:06:57 +0100 Subject: [PATCH] Revert "Desktop/ssh-agent: use home-manager module" This reverts commit 693410597aab78188d3060c21edcc6952d2950e6. Neccesary cause the home-manager module has issues --- roles/desktop/services/ssh-agent.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/roles/desktop/services/ssh-agent.nix b/roles/desktop/services/ssh-agent.nix index 56fea6b..6f734f8 100644 --- a/roles/desktop/services/ssh-agent.nix +++ b/roles/desktop/services/ssh-agent.nix @@ -1,3 +1,19 @@ {...}: { - home-manager.users.toast.services.ssh-agent.enable = true; + programs.ssh.startAgent = true; + /* + Home assistant added an option that does this + https://github.com/nix-community/home-manager/commit/2d9210f25ed18d5d4e11e6b886de4027c0c51a94 + but since I still need to fix home-manager's envvars not applying I'll stick to the NixOS one + */ + /* + TODO: fix SSH_AUTH_SOCK not being set in Plasma + Turns out the NixOS module also has issues :3 + The env is set but only in bash, not in the DE, so + keepass can't pick it up. For now I'll just set it manually + */ + home-manager.users.toast.xdg.configFile."plasma-workspace/env/ssh-agent.sh".text = '' + if [[ -z "$SSH_AUTH_SOCK" ]]; then + export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent + fi + ''; }