feat: change calibre to support unrar, add ruff lsp, fix zsh flake hook

This commit is contained in:
Jacob Bachmann 2024-05-12 21:41:04 +02:00
parent ce7da77e9c
commit ba29acb89d
Signed by: bchmnn
GPG key ID: 732A612DAD28067D
3 changed files with 12 additions and 7 deletions

View file

@ -33,7 +33,7 @@
obsidian # a powerful knowledge base that works on top of a local folder of plain text markdown files obsidian # a powerful knowledge base that works on top of a local folder of plain text markdown files
gimp # the gnu image manipulation program gimp # the gnu image manipulation program
calibre # comprehensive e-book software (calibre.override { unrarSupport = true; })
libreoffice # comprehensive, professional-quality productivity suite, a variant of openoffice.org libreoffice # comprehensive, professional-quality productivity suite, a variant of openoffice.org
xournalpp # a handwriting notetaking software with pdf annotation support xournalpp # a handwriting notetaking software with pdf annotation support
libsForQt5.okular # kde document viewer libsForQt5.okular # kde document viewer

View file

@ -13,7 +13,9 @@
rust-analyzer rust-analyzer
gopls gopls
nixd nixd
ruff # an extremely fast python linter
vscode-langservers-extracted vscode-langservers-extracted
nodePackages.typescript-language-server
tailwindcss-language-server tailwindcss-language-server
]; ];

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { { config, ... }: {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
@ -22,11 +22,14 @@
initExtra = '' initExtra = ''
nix_dev_env() { nix_dev_env() {
FLAKE="$PWD/flake.nix" FLAKE="$PWD/flake.nix"
[[ -z "$CURRENT_FLAKE_ENV" ]] && \ [[ -z "$CURRENT_FLAKE_ENV" ]] && \
[[ -f $FLAKE ]] && \ [[ -f $FLAKE ]] && \
ZSH_PREFIX="$ZSH_PREFIX(flake)" \ echo -n "Enter nix develop? (Y/N): " && \
CURRENT_FLAKE_ENV=$FLAKE \ read confirm && \
nix develop -c $SHELL 2> /dev/null [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] && \
ZSH_PREFIX="$ZSH_PREFIX(flake)" \
CURRENT_FLAKE_ENV=$FLAKE \
nix develop -c $SHELL
} }
autoload -U add-zsh-hook autoload -U add-zsh-hook
add-zsh-hook chpwd nix_dev_env add-zsh-hook chpwd nix_dev_env