refactor(fish): move ssh auth sock fish variable to ssh module

This commit is contained in:
ooks-io 2024-04-22 19:05:13 +12:00
parent da43580a5f
commit 24abca0ffe
2 changed files with 6 additions and 4 deletions

View file

@ -51,9 +51,6 @@ in
source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish" source "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish"
set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d" set --prepend fish_complete_path "$KITTY_INSTALLATION_DIR/shell-integration/fish/vendor_completions.d"
'' + '' +
''
set -gx SSH_AUTH_SOCK ~/.1password/agent.sock
'' +
# Use vim bindings and cursors # Use vim bindings and cursors
'' ''
fish_vi_key_bindings fish_vi_key_bindings

View file

@ -2,11 +2,13 @@
let let
cfg = config.homeModules.console.utility.ssh; cfg = config.homeModules.console.utility.ssh;
fish = config.homeModules.console.shell.fish;
inherit (lib) mkIf;
in in
{ {
config = lib.mkIf cfg.enable { config = mkIf cfg.enable {
programs.ssh = { programs.ssh = {
enable = true; enable = true;
extraConfig = /* config */'' extraConfig = /* config */''
@ -14,6 +16,9 @@ in
IdentityAgent "~/.1password/agent.sock" IdentityAgent "~/.1password/agent.sock"
''; '';
}; };
fish.interactiveShellInit = mkIf fish.enable ''
set -gx SSH_AUTH_SOCK ~/.1password/agent.sock
'';
}; };
} }