feat: nushellFull & bashInteractive

This commit is contained in:
Ryan Yin
2023-12-26 04:51:14 +08:00
parent e6008a35ad
commit 669404d2c3
6 changed files with 13 additions and 37 deletions

18
flake.lock generated
View File

@@ -735,23 +735,6 @@
"type": "github"
}
},
"nushell-scripts": {
"flake": false,
"locked": {
"lastModified": 1702558950,
"narHash": "sha256-pai3qeD2hmpx2r/lDfGpUY3mkl0gRN6j72gplz9DQD4=",
"owner": "nushell",
"repo": "nu_scripts",
"rev": "6f1c0dfef203fa07449718b76d31580e8458c8b7",
"type": "github"
},
"original": {
"owner": "nushell",
"ref": "main",
"repo": "nu_scripts",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": [
@@ -859,7 +842,6 @@
"nixpkgs-darwin": "nixpkgs-darwin",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur-ryan4yin": "nur-ryan4yin",
"nushell-scripts": "nushell-scripts",
"pre-commit-hooks": "pre-commit-hooks_2",
"wallpapers": "wallpapers"
}

View File

@@ -162,12 +162,6 @@
flake = false;
};
# useful nushell scripts, such as auto_completion
nushell-scripts = {
url = "github:nushell/nu_scripts/main";
flake = false;
};
######################## My own repositories #########################################
# my private secrets, it's a private repository, you need to replace it with your own.

View File

@@ -1,4 +1,4 @@
{nushell-scripts, ...}: {
{pkgs, ...}: {
programs.bash = {
# load the alias file for work
bashrcExtra = ''
@@ -19,13 +19,13 @@
# https://github.com/nushell/nushell/issues/8214
extraConfig = ''
source /etc/agenix/alias-for-work.nushell
use ${nushell-scripts}/custom-completions/git/git-completions.nu *
use ${nushell-scripts}/custom-completions/glow/glow-completions.nu *
use ${nushell-scripts}/custom-completions/make/make-completions.nu *
use ${nushell-scripts}/custom-completions/nix/nix-completions.nu *
use ${nushell-scripts}/custom-completions/man/man-completions.nu *
use ${nushell-scripts}/custom-completions/cargo/cargo-completions.nu *
use ${nushell-scripts}/custom-completions/zellij/zellij-completions.nu *
use ${pkgs.nu_scripts}/custom-completions/git/git-completions.nu *
use ${pkgs.nu_scripts}/custom-completions/glow/glow-completions.nu *
use ${pkgs.nu_scripts}/custom-completions/make/make-completions.nu *
use ${pkgs.nu_scripts}/custom-completions/nix/nix-completions.nu *
use ${pkgs.nu_scripts}/custom-completions/man/man-completions.nu *
use ${pkgs.nu_scripts}/custom-completions/cargo/cargo-completions.nu *
use ${pkgs.nu_scripts}/custom-completions/zellij/zellij-completions.nu *
'';
};
}

View File

@@ -1,7 +1,7 @@
{pkgs, ...}: {
programs.tmux = {
enable = true;
shell = "${pkgs.nushell}/bin/nu";
shell = "${pkgs.nushellFull}/bin/nu";
# Resize the window to the size of the smallest session for which it is the current window.
#

View File

@@ -70,7 +70,7 @@ in {
programs.zsh.enable = true;
environment.shells = [
pkgs.zsh
pkgs.nushell # my custom shell
pkgs.nushellFull # my custom shell
];
# homebrew need to be installed manually, see https://brew.sh

View File

@@ -6,11 +6,11 @@
}: {
# add user's shell into /etc/shells
environment.shells = with pkgs; [
bash
nushell
bashInteractive
nushellFull
];
# set user's default shell system-wide
users.defaultUserShell = pkgs.nushell;
users.defaultUserShell = pkgs.nushellFull;
# fix for `sudo xxx` in kitty/wezterm and other modern terminal emulators
security.sudo.keepTerminfo = true;