From d96a514d9e8501040bb001550fc8cad26a46e8bd Mon Sep 17 00:00:00 2001 From: Joinemm Date: Sat, 13 Jan 2024 22:43:43 +0200 Subject: [PATCH] Add more config such as direnv and null-ls --- home-modules/neovim.nix | 31 +++++++++++++++++++++++++++++-- home-modules/picom.nix | 9 +++++++++ home-modules/zsh.nix | 6 ++++++ hosts/zeus/configuration.nix | 2 -- overlays/dwmblocks.nix | 4 ++-- 5 files changed, 46 insertions(+), 6 deletions(-) diff --git a/home-modules/neovim.nix b/home-modules/neovim.nix index 94e6773..e914d3f 100644 --- a/home-modules/neovim.nix +++ b/home-modules/neovim.nix @@ -132,14 +132,13 @@ }; nvim-colorizer.enable = true; - fidget.enable = true; + # fidget.enable = true; lightline.enable = true; indent-blankline.enable = true; gitgutter.enable = true; telescope.enable = true; nvim-autopairs.enable = true; trouble.enable = true; - lsp-format.enable = true; nvim-lightbulb.enable = true; cmp-nvim-lsp.enable = true; cmp-treesitter.enable = true; @@ -200,6 +199,33 @@ }; }; + lsp-format.enable = true; + + none-ls = { + enable = true; + enableLspFormat = true; + sources = { + code_actions = { + shellcheck.enable = true; + statix.enable = true; + }; + diagnostics = { + deadnix.enable = true; + gitlint.enable = true; + luacheck.enable = true; + shellcheck.enable = true; + }; + formatting = { + jq.enable = true; + markdownlint.enable = true; + rustfmt.enable = true; + sqlfluff.enable = true; + shfmt.enable = true; + stylua.enable = true; + }; + }; + }; + lsp = { enable = true; keymaps = { @@ -226,6 +252,7 @@ settings.formatting.command = ["alejandra"]; }; lua-ls.enable = true; + bashls.enable = true; pylsp = { enable = true; settings.plugins = { diff --git a/home-modules/picom.nix b/home-modules/picom.nix index d3fedf4..325aa96 100644 --- a/home-modules/picom.nix +++ b/home-modules/picom.nix @@ -20,5 +20,14 @@ fadeExclude = [ "class_g = 'xsecurelock'" ]; + # disable vsync for fullscreen applications + settings = { + unredir-if-possible = true; + }; + # and notifications that may draw over them + wintypes = { + notification.redir-ignore = true; + notify.redir-ignore = true; + }; }; } diff --git a/home-modules/zsh.nix b/home-modules/zsh.nix index 643c36a..ab35a92 100644 --- a/home-modules/zsh.nix +++ b/home-modules/zsh.nix @@ -9,6 +9,11 @@ # run commands without installing them # , nix-index-database.comma.enable = true; + + direnv = { + enable = true; + enableZshIntegration = true; + }; }; programs.zsh = { @@ -46,6 +51,7 @@ --memory-format "{/1}{-}{/}{/2}{-}{/}{} / {}" ''; copy = "xclip -selection clipboard"; + dev = "nix develop --impure -c $SHELL"; }; envExtra = '' diff --git a/hosts/zeus/configuration.nix b/hosts/zeus/configuration.nix index 6d2e83f..abdffa9 100644 --- a/hosts/zeus/configuration.nix +++ b/hosts/zeus/configuration.nix @@ -108,7 +108,6 @@ in { with pkgs; [ # languages and dev tools python3 - pipenv rustup lua nodejs @@ -138,7 +137,6 @@ in { playerctl pulseaudio alsa-utils - pre-commit jq # json parser fd # faster find dig diff --git a/overlays/dwmblocks.nix b/overlays/dwmblocks.nix index 6c83cb8..2cf9851 100644 --- a/overlays/dwmblocks.nix +++ b/overlays/dwmblocks.nix @@ -3,8 +3,8 @@ src = pkgs.fetchFromGitHub { owner = "joinemm"; repo = "dwmblocks"; - rev = "5eb42c9b33247bea07d7e64c460d628c244fbd00"; - sha256 = "sha256-UT6O/xXfQVDacFAOUlOkClp44wkXv07fiWhtZeep5KI="; + rev = "367ae57afd8d4cfdc663c239febb9b85638502d0"; + sha256 = "sha256-X51HAexp7Dmr7TZHdiqfu+B4YzTiEOsBqAkxw16zPJc="; }; nativeBuildInputs = with pkgs; [ xorg.libX11