From 5013daa0e8b7e2db35d30f3c73b552b4f96b58c4 Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Sun, 9 Jun 2024 12:14:20 +0200 Subject: fzf-tail --- profiles/core/configuration.nix | 2 +- profiles/core/home.nix | 30 ++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) (limited to 'profiles/core') diff --git a/profiles/core/configuration.nix b/profiles/core/configuration.nix index 7b4fec3..b74c1c8 100644 --- a/profiles/core/configuration.nix +++ b/profiles/core/configuration.nix @@ -82,7 +82,7 @@ usbutils ]); - nix.package = pkgs.nixUnstable; + nix.package = pkgs.nixVersions.latest; nix.extraOptions = '' experimental-features = nix-command flakes configurable-impure-env ''; diff --git a/profiles/core/home.nix b/profiles/core/home.nix index 9434fc5..4010aff 100644 --- a/profiles/core/home.nix +++ b/profiles/core/home.nix @@ -82,14 +82,14 @@ }; }; - programs.ssh = { - enable = true; - matchBlocks = { - "*" = { - identityFile = "${config.ivi.home}/.ssh/id_ed25519_sk"; - }; - }; - }; + # programs.ssh = { + # enable = true; + # matchBlocks = { + # "*" = { + # identityFile = "${config.ivi.home}/.ssh/id_ed25519_sk"; + # }; + # }; + # }; programs.starship.enable = true; @@ -148,6 +148,19 @@ } bindkey -s '^o' '^ulfcd\n' + fzf-tail () { + fzf --tail 100000 --tac --no-sort --exact + } + + fzf-stern () { + kubectl config set-context --current --namespace "$1" + kubectl stern -n "$1" "$2" --color always 2>&1 | + fzf --ansi --tail 100000 --tac --no-sort --exact \ + --bind 'ctrl-o:execute:kubectl logs {1} | nvim -' \ + --bind 'enter:execute:kubectl exec -it {1} -- bash' \ + --header '╱ Enter (kubectl exec) ╱ CTRL-O (open log in vim) ╱' + } + login-to-cloud () { case $1 in aws) @@ -218,6 +231,7 @@ lock-pass = "gpgconf --kill gpg-agent"; use-gpg-ssh = "export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)"; use-fido-ssh = "export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock"; + sshdo = "ssh -f -q -o 'StrictHostKeyChecking no' "; }; }; -- cgit v1.2.3