nixos/shell: provide prompt information when SSH_AUTH_SOCK exists

This commit is contained in:
Wroclaw 2025-05-18 16:23:53 +02:00
parent 2f88baa90f
commit be46e02c61

View file

@ -133,6 +133,7 @@ in
settings = { settings = {
format = lib.concatStrings [ format = lib.concatStrings [
"$all" "$all"
"\${custom.sshAuthSocket}"
"$line_break" "$line_break"
"\${custom.ranger}" "\${custom.ranger}"
"$jobs" "$jobs"
@ -160,6 +161,12 @@ in
command = "echo \"\""; command = "echo \"\"";
style = "bold 208"; style = "bold 208";
}; };
custom.sshAuthSocket = {
when = "test -S \"$SSH_AUTH_SOCK\"";
command = "echo -e \"SSH Auth Agent\"";
style = "124";
format = "with [$output]($style) ";
};
}; };
}; };
}; };