2.home-manager/tests/modules/services/proton-pass-agent/bash-integration.nix
Austin Horstman 57134be3b8 tests: align darwin getconf placeholder for ssh/proton agents
Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-03-03 14:24:37 -06:00

23 lines
560 B
Nix

{ pkgs, ... }:
{
services.proton-pass-agent = {
enable = true;
enableBashIntegration = true;
};
programs.bash.enable = true;
nmt.script = ''
bash_profile=home-files/.profile
assertFileContains $bash_profile \
'if [ -z "$SSH_AUTH_SOCK" -o -z "$SSH_CONNECTION" ]; then'
assertFileContains $bash_profile \
'export SSH_AUTH_SOCK=${
if pkgs.stdenv.hostPlatform.isDarwin then
"$(@system_cmds@/bin/getconf DARWIN_USER_TEMP_DIR)"
else
"$XDG_RUNTIME_DIR"
}/proton-pass-agent'
'';
}