From ba29acb89d46b83953427db94c91e302136a95fa Mon Sep 17 00:00:00 2001 From: Jacob Bachmann Date: Sun, 12 May 2024 21:41:04 +0200 Subject: [PATCH] feat: change calibre to support unrar, add ruff lsp, fix zsh flake hook --- users/gandalf/modules/gui/programs/default.nix | 2 +- users/gandalf/modules/neovim/default.nix | 2 ++ users/gandalf/modules/zsh.nix | 15 +++++++++------ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/users/gandalf/modules/gui/programs/default.nix b/users/gandalf/modules/gui/programs/default.nix index a9d0b1d..e6cd9b2 100644 --- a/users/gandalf/modules/gui/programs/default.nix +++ b/users/gandalf/modules/gui/programs/default.nix @@ -33,7 +33,7 @@ obsidian # a powerful knowledge base that works on top of a local folder of plain text markdown files 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 xournalpp # a handwriting notetaking software with pdf annotation support libsForQt5.okular # kde document viewer diff --git a/users/gandalf/modules/neovim/default.nix b/users/gandalf/modules/neovim/default.nix index 316f7f4..39dc440 100644 --- a/users/gandalf/modules/neovim/default.nix +++ b/users/gandalf/modules/neovim/default.nix @@ -13,7 +13,9 @@ rust-analyzer gopls nixd + ruff # an extremely fast python linter vscode-langservers-extracted + nodePackages.typescript-language-server tailwindcss-language-server ]; diff --git a/users/gandalf/modules/zsh.nix b/users/gandalf/modules/zsh.nix index a407251..c7a5c81 100644 --- a/users/gandalf/modules/zsh.nix +++ b/users/gandalf/modules/zsh.nix @@ -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