Compare commits

..

No commits in common. "6e0dcedd3ff9f2b9ba7b9934b51e97c3230a2c5a" and "b50b7cfcde3be307d425c9d065313e1c5f001f84" have entirely different histories.

9 changed files with 31 additions and 33 deletions

View File

@ -20,12 +20,12 @@
use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/btm/btm-completions.nu *
use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/git/git-completions.nu *
use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/glow/glow-completions.nu *
use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/just/just-completions.nu *
use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/just/just.nu *
use ${pkgs.nu_scripts}/share/nu_scripts/custom-completions/nix/nix-completions.nu *
'';
extraEnv = ''
$env.GOPATH = "${config.xdg.dataHome}/go"
$env.PATH = ($env.PATH | split row (char esep) | prepend '${config.xdg.dataHome}/go/bin')
let-env GOPATH = "${config.xdg.dataHome}/go"
let-env PATH = ($env.PATH | split row (char esep) | prepend '${config.xdg.dataHome}/go/bin')
'';
};
xdg.configFile = {

View File

@ -297,7 +297,7 @@ let light_theme = {
# The default config record. This is where much of your global configuration is setup.
$env.config = {
let-env config = {
ls: {
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
clickable_links: true # enable or disable clickable links. Your terminal has to support links.

View File

@ -19,21 +19,21 @@ def create_right_prompt [] {
}
# Use nushell functions to define your right and left prompt
$env.PROMPT_COMMAND = { create_left_prompt }
$env.PROMPT_COMMAND_RIGHT = { create_right_prompt }
let-env PROMPT_COMMAND = { create_left_prompt }
let-env PROMPT_COMMAND_RIGHT = { create_right_prompt }
# The prompt indicators are environmental variables that represent
# the state of the prompt
$env.PROMPT_INDICATOR = { "〉" }
$env.PROMPT_INDICATOR_VI_INSERT = { ": " }
$env.PROMPT_INDICATOR_VI_NORMAL = { "〉" }
$env.PROMPT_MULTILINE_INDICATOR = { "::: " }
let-env PROMPT_INDICATOR = { "〉" }
let-env PROMPT_INDICATOR_VI_INSERT = { ": " }
let-env PROMPT_INDICATOR_VI_NORMAL = { "〉" }
let-env PROMPT_MULTILINE_INDICATOR = { "::: " }
# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running external commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
$env.ENV_CONVERSIONS = {
let-env ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) | path expand -n }
to_string: { |v| $v | path expand -n | str join (char esep) }
@ -47,16 +47,16 @@ $env.ENV_CONVERSIONS = {
# Directories to search for scripts when calling source or use
#
# By default, <nushell-config-dir>/scripts is added
$env.NU_LIB_DIRS = [
let-env NU_LIB_DIRS = [
($nu.config-path | path dirname | path join 'scripts')
]
# Directories to search for plugin binaries when calling register
#
# By default, <nushell-config-dir>/plugins is added
$env.NU_PLUGIN_DIRS = [
let-env NU_PLUGIN_DIRS = [
($nu.config-path | path dirname | path join 'plugins')
]
# To add entries to PATH (on Windows you might use Path), you can use the following pattern:
# $env.PATH = ($env.PATH | split row (char esep) | prepend '/some/path')
# let-env PATH = ($env.PATH | split row (char esep) | prepend '/some/path')

View File

@ -26,8 +26,8 @@ def nixdev [
}
## Other ##
$env.EDITOR = hx
$env.config = ($env.config | upsert "shell_integration" ("WEZTERM_PANE" not-in $env and "SSH_CLIENT" not-in $env))
let-env EDITOR = hx
let-env config = ($env.config | upsert "shell_integration" ("WEZTERM_PANE" not-in $env and "SSH_CLIENT" not-in $env))
source ~/.config/nushell/zoxide.nu
source ~/.config/nushell/ohmyposh.nu

View File

@ -1,18 +1,18 @@
export-env {
$env.POWERLINE_COMMAND = 'oh-my-posh'
$env.POSH_THEME = "~/.config/oh-my-posh/config.json"
$env.PROMPT_INDICATOR = ""
$env.POSH_PID = (random uuid)
let-env POWERLINE_COMMAND = 'oh-my-posh'
let-env POSH_THEME = "~/.config/oh-my-posh/config.json"
let-env PROMPT_INDICATOR = ""
let-env POSH_PID = (random uuid)
# By default displays the right prompt on the first line
# making it annoying when you have a multiline prompt
# making the behavior different compared to other shells
$env.PROMPT_COMMAND_RIGHT = {''}
$env.NU_VERSION = (version | get version)
let-env PROMPT_COMMAND_RIGHT = {''}
let-env NU_VERSION = (version | get version)
# PROMPTS
$env.PROMPT_MULTILINE_INDICATOR = (^oh-my-posh print secondary $"--config=($env.POSH_THEME)" --shell=nu $"--shell-version=($env.NU_VERSION)")
let-env PROMPT_MULTILINE_INDICATOR = (^oh-my-posh print secondary $"--config=($env.POSH_THEME)" --shell=nu $"--shell-version=($env.NU_VERSION)")
$env.PROMPT_COMMAND = {
let-env PROMPT_COMMAND = {
# We have to do this because the initial value of `$env.CMD_DURATION_MS` is always `0823`,
# which is an official setting.
# See https://github.com/nushell/nushell/discussions/6402#discussioncomment-3466687.

View File

@ -7,12 +7,12 @@
# 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|
let-env __zoxide_hooked = true
let-env config = ($env | default {} config).config
let-env config = ($env.config | default {} hooks)
let-env config = ($env.config | update hooks ($env.config.hooks | default {} env_change))
let-env config = ($env.config | update hooks.env_change ($env.config.hooks.env_change | default [] PWD))
let-env config = ($env.config | update hooks.env_change.PWD ($env.config.hooks.env_change.PWD | append {|_, dir|
zoxide add -- $dir
}))
}

View File

@ -34,7 +34,6 @@ in {
settings = {X11Forwarding = true;};
};
globalprotect.enable = true;
tailscale.enable = true;
};
virtualisation.docker.enable = true;

View File

@ -64,5 +64,5 @@
systemPackages = with pkgs; [podman podman-compose podman-tui];
};
fonts.packages = with pkgs; [(nerdfonts.override {fonts = ["JetBrainsMono"];})];
fonts.fonts = with pkgs; [(nerdfonts.override {fonts = ["JetBrainsMono"];})];
}

View File

@ -36,7 +36,6 @@ in {
blueman.enable = true;
openssh.enable = true;
pcscd.enable = true;
tailscale.enable = true;
};
virtualisation.docker.enable = true;