From ee28dac8c1b1118384537060b7b0b0307c8364aa Mon Sep 17 00:00:00 2001 From: jolheiser Date: Wed, 28 Aug 2024 22:05:21 -0500 Subject: [PATCH] chore: clean up zoxide and ssh Signed-off-by: jolheiser --- apps/nogui/gpg.nix | 2 +- apps/nogui/nushell.nix | 1 - apps/nogui/nushell/jolheiser.nu | 3 +- apps/nogui/nushell/zoxide.nu | 60 --------------------------------- apps/nogui/zoxide.nix | 2 -- 5 files changed, 2 insertions(+), 66 deletions(-) delete mode 100644 apps/nogui/nushell/zoxide.nu diff --git a/apps/nogui/gpg.nix b/apps/nogui/gpg.nix index bb1873d..bbf88d1 100644 --- a/apps/nogui/gpg.nix +++ b/apps/nogui/gpg.nix @@ -31,7 +31,7 @@ in }; }; services.gpg-agent = { - enable = true; + enable = false; enableExtraSocket = true; enableSshSupport = true; pinentryPackage = pkgs.pinentry-gnome3; diff --git a/apps/nogui/nushell.nix b/apps/nogui/nushell.nix index 918dcd5..1d919a7 100644 --- a/apps/nogui/nushell.nix +++ b/apps/nogui/nushell.nix @@ -30,7 +30,6 @@ }; xdg.configFile = { "nushell/jolheiser.nu".source = ./nushell/jolheiser.nu; - "nushell/zoxide.nu".source = ./nushell/zoxide.nu; "nushell/ohmyposh.nu".source = ./nushell/ohmyposh.nu; }; } diff --git a/apps/nogui/nushell/jolheiser.nu b/apps/nogui/nushell/jolheiser.nu index c9ff053..ad1666a 100644 --- a/apps/nogui/nushell/jolheiser.nu +++ b/apps/nogui/nushell/jolheiser.nu @@ -99,6 +99,5 @@ def , [ ## Other ## $env.EDITOR = hx -source ~/.config/nushell/zoxide.nu source ~/.config/nushell/ohmyposh.nu - +$env.SSH_AUTH_SOCK = '/run/user/1000/ssh-agent' diff --git a/apps/nogui/nushell/zoxide.nu b/apps/nogui/nushell/zoxide.nu deleted file mode 100644 index 2382c52..0000000 --- a/apps/nogui/nushell/zoxide.nu +++ /dev/null @@ -1,60 +0,0 @@ -# Code generated by zoxide. DO NOT EDIT. - -# ============================================================================= -# -# Hook configuration for zoxide. -# - -# Initialize hook to add new entries to the database. -if (not ($env | default false __zoxide_hooked | get __zoxide_hooked)) { - $env.__zoxide_hooked = true - $env.config = ($env | default {} config).config - $env.config = ($env.config | default {} hooks) - $env.config = ($env.config | update hooks ($env.config.hooks | default {} env_change)) - $env.config = ($env.config | update hooks.env_change ($env.config.hooks.env_change | default [] PWD)) - $env.config = ($env.config | update hooks.env_change.PWD ($env.config.hooks.env_change.PWD | append {|_, dir| - zoxide add -- $dir - })) -} - -# ============================================================================= -# -# When using zoxide with --no-cmd, alias these internal functions as desired. -# - -# Jump to a directory using only keywords. -def --env __zoxide_z [...rest:string] { - let arg0 = ($rest | append '~').0 - let path = if (($rest | length) <= 1) and ($arg0 == '-' or ($arg0 | path expand | path type) == dir) { - $arg0 - } else { - (zoxide query --exclude $env.PWD -- $rest | str trim -r -c "\n") - } - cd $path -} - -# Jump to a directory using interactive search. -def --env __zoxide_zi [...rest:string] { - cd $'(zoxide query --interactive -- $rest | str trim -r -c "\n")' -} - -# ============================================================================= -# -# Commands for zoxide. Disable these using --no-cmd. -# - -alias z = __zoxide_z -alias zi = __zoxide_zi - -# ============================================================================= -# -# Add this to your env file (find it by running `$nu.env-path` in Nushell): -# -# zoxide init nushell | save -f ~/.zoxide.nu -# -# Now, add this to the end of your config file (find it by running -# `$nu.config-path` in Nushell): -# -# source ~/.zoxide.nu -# -# Note: zoxide only supports Nushell v0.73.0 and above. diff --git a/apps/nogui/zoxide.nix b/apps/nogui/zoxide.nix index 1286133..3b81ab7 100644 --- a/apps/nogui/zoxide.nix +++ b/apps/nogui/zoxide.nix @@ -1,7 +1,5 @@ { programs.zoxide = { enable = true; - # TODO remove once zoxide is updated for new nushell def --env syntax - enableNushellIntegration = false; }; }