feat: change calibre to support unrar, add ruff lsp, fix zsh flake hook
This commit is contained in:
parent
ce7da77e9c
commit
ba29acb89d
3 changed files with 12 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{ config, ... }: {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
|
@ -22,11 +22,14 @@
|
|||
initExtra = ''
|
||||
nix_dev_env() {
|
||||
FLAKE="$PWD/flake.nix"
|
||||
[[ -z "$CURRENT_FLAKE_ENV" ]] && \
|
||||
[[ -f $FLAKE ]] && \
|
||||
ZSH_PREFIX="$ZSH_PREFIX(flake)" \
|
||||
CURRENT_FLAKE_ENV=$FLAKE \
|
||||
nix develop -c $SHELL 2> /dev/null
|
||||
[[ -z "$CURRENT_FLAKE_ENV" ]] && \
|
||||
[[ -f $FLAKE ]] && \
|
||||
echo -n "Enter nix develop? (Y/N): " && \
|
||||
read confirm && \
|
||||
[[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] && \
|
||||
ZSH_PREFIX="$ZSH_PREFIX(flake)" \
|
||||
CURRENT_FLAKE_ENV=$FLAKE \
|
||||
nix develop -c $SHELL
|
||||
}
|
||||
autoload -U add-zsh-hook
|
||||
add-zsh-hook chpwd nix_dev_env
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue