diff --git a/nix-on-droid/cheetah/configuration.nix b/nix-on-droid/cheetah/configuration.nix index de3c9e1..9a874c1 100644 --- a/nix-on-droid/cheetah/configuration.nix +++ b/nix-on-droid/cheetah/configuration.nix @@ -12,6 +12,8 @@ # # Set $EDITOR # environment.variables.EDITOR = "nvim"; + user.shell = "${pkgs.zsh}/bin/zsh"; + # Read the changelog before changing this value system.stateVersion = "22.05"; diff --git a/nix-on-droid/cheetah/home.nix b/nix-on-droid/cheetah/home.nix index bb6007e..f571c46 100644 --- a/nix-on-droid/cheetah/home.nix +++ b/nix-on-droid/cheetah/home.nix @@ -35,6 +35,9 @@ zip unzip + direnv + nix-direnv + # Bling onefetch neofetch @@ -90,6 +93,39 @@ ]; }; + programs.zsh = { + enable = true; + enableCompletion = true; + defaultKeymap = "viins"; + + shellAliases = { + # ll = "ls -l"; + # update = "sudo nixos-rebuild switch"; + }; + + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + }; + + initExtra = '' + eval "$(direnv hook zsh)" + ''; + + plugins = [ + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.5.0"; + sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91"; + }; + } + ]; + }; + programs.starship = { enable = true; @@ -297,4 +333,9 @@ defaultCacheTtl = 1800; enableSshSupport = true; }; + + # Using nix-direnv + # services.lorri = { + # enable = true; + # }; }