diff --git a/apps/nogui/gpg.nix b/apps/nogui/gpg.nix index bbf88d12445212bfa5f9e7f2d37cb5dcdb0864cb..bb1873d19625b99ee6f99bc4187adcd95e0dd05e 100644 --- a/apps/nogui/gpg.nix +++ b/apps/nogui/gpg.nix @@ -31,7 +31,7 @@ keyserver = "hkps://keys.openpgp.org"; }; }; services.gpg-agent = { - enable = false; + enable = true; enableExtraSocket = true; enableSshSupport = true; pinentryPackage = pkgs.pinentry-gnome3; diff --git a/apps/nogui/nushell.nix b/apps/nogui/nushell.nix index 1d919a7446bf9365f407f801a78e6a2c53ca7739..918dcd5a16cdb8bf38a10b4fe878b72431aa4dc1 100644 --- a/apps/nogui/nushell.nix +++ b/apps/nogui/nushell.nix @@ -31,6 +31,8 @@ }; xdg.configFile = { "nushell/jolheiser.nu".source = ./nushell/jolheiser.nu; programs.nushell = { + enable = true; + programs.nushell = { { }; } diff --git a/apps/nogui/nushell/jolheiser.nu b/apps/nogui/nushell/jolheiser.nu index ad1666a080d1c138bf9f437318cff4427863f090..c9ff05362ca9f56a6690623eab2c898678eb1209 100644 --- a/apps/nogui/nushell/jolheiser.nu +++ b/apps/nogui/nushell/jolheiser.nu @@ -100,5 +100,6 @@ ## Other ## $env.EDITOR = hx +alias cat = bat + -## Aliases ## diff --git a/apps/nogui/nushell/zoxide.nu b/apps/nogui/nushell/zoxide.nu new file mode 100644 index 0000000000000000000000000000000000000000..2382c52071db0d34d0954de517f6d3bc29072f9b --- /dev/null +++ b/apps/nogui/nushell/zoxide.nu @@ -0,0 +1,60 @@ +# 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 3b81ab75a76c89e205f3099234c1fd6b152cabb7..12861330e18d3fc6e925eda72c06dab7c7aa1f04 100644 --- a/apps/nogui/zoxide.nix +++ b/apps/nogui/zoxide.nix @@ -1,5 +1,7 @@ { programs.zoxide = { enable = true; + # TODO remove once zoxide is updated for new nushell def --env syntax + enableNushellIntegration = false; }; }