cleanup shell (remove xonsh
)
This commit is contained in:
parent
28f4c81795
commit
7ed053524f
1 changed files with 5 additions and 49 deletions
|
@ -1,11 +1,5 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
# enable bash completions
|
|
||||||
# even though we don't use bash as our shell, xonsh uses bash completion scripts
|
|
||||||
programs.bash.completion.enable = true;
|
|
||||||
|
|
||||||
programs.command-not-found.enable = false;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
any-nix-shell
|
any-nix-shell
|
||||||
];
|
];
|
||||||
|
@ -57,9 +51,10 @@
|
||||||
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
promptInit = ''
|
promptInit = # zsh
|
||||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin
|
''
|
||||||
'';
|
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin
|
||||||
|
'';
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
ff = "fastfetch";
|
ff = "fastfetch";
|
||||||
|
@ -74,7 +69,7 @@
|
||||||
git = "hub";
|
git = "hub";
|
||||||
cc = "fj --host=https://www.coastalcommits.com --style=fancy";
|
cc = "fj --host=https://www.coastalcommits.com --style=fancy";
|
||||||
cb = "fj --host https://codeberg.org --style=fancy";
|
cb = "fj --host https://codeberg.org --style=fancy";
|
||||||
eza = "--time-style=long-iso --icons=auto --hyperlink";
|
eza = "eza --time-style=long-iso --icons=auto --hyperlink";
|
||||||
l = "eza -lhg";
|
l = "eza -lhg";
|
||||||
la = "eza -lAh";
|
la = "eza -lAh";
|
||||||
ll = "l";
|
ll = "l";
|
||||||
|
@ -99,45 +94,6 @@
|
||||||
histFile = "$HOME/.zsh_history";
|
histFile = "$HOME/.zsh_history";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.xonsh =
|
|
||||||
let
|
|
||||||
bashcfg = config.programs.bash;
|
|
||||||
#xontrib-cd = pkgs.callPackage ../packages/xontribs/xontrib-cd.nix { inherit pkgs; };
|
|
||||||
xontrib-clp = pkgs.callPackage ../packages/xontribs/xontrib-clp.nix { inherit pkgs; };
|
|
||||||
xontrib-direnv = pkgs.callPackage ../packages/xontribs/xontrib-direnv.nix { inherit pkgs; };
|
|
||||||
xontrib-sh = pkgs.callPackage ../packages/xontribs/xontrib-sh.nix { inherit pkgs; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
config = ''
|
|
||||||
$BASH_COMPLETIONS = ('${bashcfg.completion.package}/etc/profile.d/bash_completion.sh')
|
|
||||||
$UPDATE_OS_ENVIRON = True
|
|
||||||
$XONTRIB_CLP_ALIAS = 'shutil'
|
|
||||||
#xontrib load cd
|
|
||||||
xontrib load clp
|
|
||||||
xontrib load direnv
|
|
||||||
xontrib load sh
|
|
||||||
source-bash ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
|
||||||
tmpfile = $(mktemp)
|
|
||||||
gh copilot alias -- bash > @(tmpfile)
|
|
||||||
source-bash @(tmpfile)
|
|
||||||
execx($(${pkgs.any-nix-shell}/bin/any-nix-shell xonsh --info-right))
|
|
||||||
'';
|
|
||||||
package = pkgs.xonsh.override {
|
|
||||||
extraPackages = ps: [
|
|
||||||
pkgs.python311Packages.rich
|
|
||||||
xontrib-clp
|
|
||||||
xontrib-direnv
|
|
||||||
xontrib-sh
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#TODO: Submit a PR to nixpkgs to add xonsh support to the Starship module
|
|
||||||
# After that, we can remove this import and the disabledModules line
|
|
||||||
disabledModules = [ "programs/starship.nix" ];
|
|
||||||
imports = [ /bulk/home/cswimr/Projects/nixpkgs/nixos/modules/programs/starship.nix ];
|
|
||||||
|
|
||||||
# starship - a customizable prompt for any shell
|
# starship - a customizable prompt for any shell
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue