diff --git a/modules/nushell/configuration.nu b/modules/nushell/configuration.nu index 50cce8d..df77d85 100644 --- a/modules/nushell/configuration.nu +++ b/modules/nushell/configuration.nu @@ -405,3 +405,8 @@ $env.config.keybindings = [ event: { send: enter } } ] + +$env.LS_COLORS = (open ~/.config/nushell/ls_colors.txt) +source ~/.config/nushell/zoxide.nu + +source ~/.config/nushell/starship.nu diff --git a/modules/nushell/default.nix b/modules/nushell/default.nix index a562c7e..1ff640d 100644 --- a/modules/nushell/default.nix +++ b/modules/nushell/default.nix @@ -33,9 +33,15 @@ "nushell/ls_colors.txt".source = pkgs.runCommand "ls_colors.txt" {} '' ${lib.getExe pkgs.vivid} generate gruvbox-dark-hard > $out ''; + + "nushell/starship.nu".source = pkgs.runCommand "starship.nu" {} '' + ${lib.getExe pkgs.starship} init nu > $out + ''; }; - programs.starship = enabled { + # No `enabled` because home-manager is terrible and spits out something + # that does it at runtime instead of doing it at system realization time. + programs.starship = { settings = { command_timeout = 100; scan_timeout = 20; diff --git a/modules/nushell/environment.nu b/modules/nushell/environment.nu index b4f23e9..31d5eef 100644 --- a/modules/nushell/environment.nu +++ b/modules/nushell/environment.nu @@ -7,8 +7,6 @@ $env.ENV_CONVERSIONS.PATH = { } } -$env.LS_COLORS = (open ~/.config/nushell/ls_colors.txt) - def --env mc [path: path] { mkdir $path cd $path @@ -19,5 +17,3 @@ def --env mcg [path: path] { cd $path git init } - -source ~/.config/nushell/zoxide.nu