forked from mirrors_public/oddlama_nix-config
feat: test nushell
This commit is contained in:
parent
bad942c919
commit
449d9a2200
2 changed files with 13 additions and 86 deletions
24
flake.lock
generated
24
flake.lock
generated
|
@ -109,11 +109,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670513770,
|
||||
"narHash": "sha256-muL74fsbGA8K8WlZSPNWddOiuBnC54kAajncX6nXrh4=",
|
||||
"lastModified": 1670970889,
|
||||
"narHash": "sha256-TWJo3/X3Q3r+HeX16QN4FE6ddBpGtAboymSEF+4Nnc0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "054d9e3187ca00479e8036dc0e92900a384f30fd",
|
||||
"rev": "e412025fffdcd6219ddd21c65d9a1b90005ce508",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -139,11 +139,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1670174919,
|
||||
"narHash": "sha256-XdQr3BUnrvVLRFunLWrZORhwYHDG0+9jUUe0Jv1pths=",
|
||||
"lastModified": 1670959777,
|
||||
"narHash": "sha256-9nQJWL7S77YZERxairPLFO6TUuF1RgQmdZO6dKRCHz4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "9d87bc030a0bf3f00e953dbf095a7d8e852dab6b",
|
||||
"rev": "0fbf27af51a7c9bc68a168fdcd63513c4f100b15",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -154,11 +154,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1670332253,
|
||||
"narHash": "sha256-O5SmhlIUt1s+vK4NXeGYqwcBIMwbBPAEZ3GHE3XT28c=",
|
||||
"lastModified": 1670929434,
|
||||
"narHash": "sha256-n5UBO6XBV4h3TB7FYu2yAuNQMEYOrQyKeODUwKe06ow=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1c9ffcf70786f0966982ce0fc76ec05df2e1dec2",
|
||||
"rev": "1710ed1f6f8ceb75cf7d1cf55ee0cc21760e1c7a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -199,11 +199,11 @@
|
|||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1670413394,
|
||||
"narHash": "sha256-M7sWqrKtOqUv9euX1t3HCxis8cPy9MNiZxQmUf0KF1o=",
|
||||
"lastModified": 1671014608,
|
||||
"narHash": "sha256-YLb4l6K6sD9xXBJ9GKQ98fBMrpENAadm2RQCfpC3794=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "1303a1a76e9eb074075bfe566518c413f6fc104e",
|
||||
"rev": "047f96a4e11f58e17be51e57f431cf88bcb28a29",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -1,78 +1,5 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.zsh = {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
enableVteIntegration = pkgs.stdenv.isLinux;
|
||||
autocd = true;
|
||||
dotDir = ".config/zsh";
|
||||
history = {
|
||||
expireDuplicatesFirst = true;
|
||||
extended = true;
|
||||
ignoreDups = true;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
save = 10000;
|
||||
share = true;
|
||||
};
|
||||
envExtra = ''
|
||||
export LESSHISTFILE="${config.xdg.dataHome}/less_history"
|
||||
export CARGO_HOME="${config.xdg.cacheHome}/cargo"
|
||||
'';
|
||||
initExtra = ''
|
||||
nix-closure-size() {
|
||||
nix-store -q --size $(nix-store -qR $(${pkgs.coreutils}/bin/readlink -e $1) ) |
|
||||
${pkgs.gawk}/bin/gawk '{ a+=$1 } END { print a }' |
|
||||
${pkgs.coreutils}/bin/numfmt --to=iec-i
|
||||
}
|
||||
bindkey "$${terminfo[khome]}" beginning-of-line
|
||||
bindkey "$${terminfo[kend]}" end-of-line
|
||||
bindkey "$${terminfo[kdch1]}" delete-char
|
||||
bindkey '\eOA' history-substring-search-up
|
||||
bindkey '\eOB' history-substring-search-down
|
||||
bindkey "^[[A" history-substring-search-up
|
||||
bindkey "^[[B" history-substring-search-down
|
||||
bindkey "$$terminfo[kcuu1]" history-substring-search-up
|
||||
bindkey "$$terminfo[kcud1]" history-substring-search-down
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;3C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
bindkey "^[[1;3D" backward-word
|
||||
bindkey -s "^O" 'fzf | xargs -r $VISUAL^M'
|
||||
bindkey -rpM viins '^[^['
|
||||
KEYTIMEOUT=1
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh | source /dev/stdin
|
||||
'';
|
||||
sessionVariables = {
|
||||
RPROMPT = "";
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
# https://github.com/hlissner/zsh-autopair
|
||||
name = "zsh-autopair";
|
||||
file = "zsh-autopair.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "hlissner";
|
||||
repo = "zsh-autopair";
|
||||
rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49";
|
||||
sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1";
|
||||
};
|
||||
}
|
||||
{
|
||||
# https://github.com/zsh-users/zsh-history-substring-search
|
||||
name = "zsh-history-substring-search";
|
||||
file = "zsh-history-substring-search.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-history-substring-search";
|
||||
rev = "0f80b8eb3368b46e5e573c1d91ae69eb095db3fb";
|
||||
sha256 = "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue