Commit 5b9259e6f021

Vincent Demeester <vincent@sbr.pm>
2026-01-13 14:03:32
fix(imapfilter): configure SSH for git pull in systemd service
Set GIT_SSH_COMMAND to use the user's SSH config explicitly, allowing git pull to access the private repository from systemd service context. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 5520b99
Changed files (1)
home
common
home/common/services/imapfilter.nix
@@ -14,6 +14,10 @@
     Service = {
       Type = "oneshot";
       # Update rules from private repository before filtering
+      # Configure git to use SSH without agent (direct key access)
+      Environment = [
+        "GIT_SSH_COMMAND=${pkgs.openssh}/bin/ssh -F %h/.ssh/config"
+      ];
       ExecStartPre = "${pkgs.git}/bin/git -C %h/.local/share/imapfilter-rules pull --quiet";
       # Password is read from agenix secret file in Lua config
       # Verbose mode enabled for testing new filters