Refactor ssh&users
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{ ... }: {
|
||||
flake.lib.rbwSshSocket =
|
||||
let
|
||||
# Bash/Fish init snippets — used by wisdom/shells/{bash,fish}.nix.
|
||||
bashSnippet = ''
|
||||
if [ -z "''${SSH_AUTH_SOCK:-}" ]; then
|
||||
if [ -n "''${XDG_RUNTIME_DIR:-}" ]; then
|
||||
@@ -21,10 +22,10 @@
|
||||
end
|
||||
end
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
inherit bashSnippet fishSnippet;
|
||||
# Used by home-manager modules to expose SSH_AUTH_SOCK to GUI apps
|
||||
# and HM-managed shells declaratively (no activation script needed).
|
||||
sessionVariable = "$XDG_RUNTIME_DIR/rbw/ssh-agent-socket";
|
||||
activationPath = "/run/user/$(id -u)/rbw/ssh-agent-socket";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user