From b6102124a115dbfdafc12c082f9bd6474a1bd0ba Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 26 Oct 2023 12:50:59 +0000 Subject: [PATCH 1/3] overlays: add 'gruvbox-nvim-old-diff' I dislike the new style of diff [1]. Thankfully somebody wrote a patch to configure it [2] (though not completely to my liking, so the local patch here is a bit different). I used it as a basis, but made it always revert, rather than configurable. [1]: https://github.com/ellisonleao/gruvbox.nvim/issues/290 [2]: https://github.com/ellisonleao/gruvbox.nvim/pull/291 --- overlays/gruvbox-nvim-old-diff/default.nix | 4 +++ overlays/gruvbox-nvim-old-diff/generated.nix | 24 ++++++++++++++++ .../gruvbox-nvim-old-diff/old-colours.patch | 28 +++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 overlays/gruvbox-nvim-old-diff/default.nix create mode 100644 overlays/gruvbox-nvim-old-diff/generated.nix create mode 100644 overlays/gruvbox-nvim-old-diff/old-colours.patch diff --git a/overlays/gruvbox-nvim-old-diff/default.nix b/overlays/gruvbox-nvim-old-diff/default.nix new file mode 100644 index 0000000..832e71d --- /dev/null +++ b/overlays/gruvbox-nvim-old-diff/default.nix @@ -0,0 +1,4 @@ +self: prev: +{ + vimPlugins = prev.vimPlugins.extend (self.callPackage ./generated.nix { }); +} diff --git a/overlays/gruvbox-nvim-old-diff/generated.nix b/overlays/gruvbox-nvim-old-diff/generated.nix new file mode 100644 index 0000000..05f6271 --- /dev/null +++ b/overlays/gruvbox-nvim-old-diff/generated.nix @@ -0,0 +1,24 @@ +{ vimUtils, fetchFromGitHub }: + +_final: _prev: { + gruvbox-nvim = vimUtils.buildVimPlugin { + pname = "gruvbox.nvim"; + version = "2023-10-07"; + + src = fetchFromGitHub { + owner = "ellisonleao"; + repo = "gruvbox.nvim"; + rev = "477c62493c82684ed510c4f70eaf83802e398898"; + sha256 = "0250c24c6n6yri48l288irdawhqs16qna3y74rdkgjd2jvh66vdm"; + }; + + patches = [ + # Inspired by https://github.com/ellisonleao/gruvbox.nvim/pull/291 + ./old-colours.patch + ]; + + meta = { + homepage = "https://github.com/ellisonleao/gruvbox.nvim/"; + }; + }; +} diff --git a/overlays/gruvbox-nvim-old-diff/old-colours.patch b/overlays/gruvbox-nvim-old-diff/old-colours.patch new file mode 100644 index 0000000..99c39b4 --- /dev/null +++ b/overlays/gruvbox-nvim-old-diff/old-colours.patch @@ -0,0 +1,28 @@ +From 416b3c9c5e783d173ac0fd5310a76c1b144b92c1 Mon Sep 17 00:00:00 2001 +From: eeeXun +Date: Thu, 19 Oct 2023 02:34:12 +0800 +Subject: feat: make invert_diff configurable + +--- + README.md | 3 ++- + lua/gruvbox.lua | 7 ++++--- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/lua/gruvbox.lua b/lua/gruvbox.lua +index ceba0735..a319fc6a 100644 +--- a/lua/gruvbox.lua ++++ b/lua/gruvbox.lua +@@ -360,9 +361,9 @@ local function get_groups() + PmenuSel = { fg = colors.bg2, bg = colors.blue, bold = config.bold }, + PmenuSbar = { bg = colors.bg2 }, + PmenuThumb = { bg = colors.bg4 }, +- DiffDelete = { bg = colors.dark_red }, +- DiffAdd = { bg = colors.dark_green }, +- DiffChange = { bg = colors.dark_aqua }, +- DiffText = { bg = colors.yellow, fg = colors.bg0 }, ++ DiffDelete = { fg = colors.bg0, bg = colors.red, reverse = config.inverse }, ++ DiffAdd = { fg = colors.bg0, bg = colors.green, reverse = config.inverse }, ++ DiffChange = { fg = colors.bg0, bg = colors.aqua, reverse = config.inverse }, ++ DiffText = { bg = colors.yellow, fg = colors.bg0, reverse = config.inverse }, + SpellCap = { link = "GruvboxBlueUnderline" }, + SpellBad = { link = "GruvboxRedUnderline" }, From eebc8c8d848f1914fe57fb91e115a0ef1e018a10 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 18 Oct 2023 15:26:35 +0000 Subject: [PATCH 2/3] home: vim: migrate to 'none-ls-nvim' This is the community-maintained fork of the plug-in. --- home/vim/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/vim/default.nix b/home/vim/default.nix index ec18f5c..871bf40 100644 --- a/home/vim/default.nix +++ b/home/vim/default.nix @@ -67,7 +67,7 @@ in nvim-lspconfig # Easy LSP configuration lsp-format-nvim # Simplified formatting configuration lsp_lines-nvim # Show diagnostics *over* regions - null-ls-nvim # LSP integration for linters and formatters + none-ls-nvim # LSP integration for linters and formatters nvim-treesitter.withAllGrammars # Better highlighting nvim-treesitter-textobjects # More textobjects nvim-ts-context-commentstring # Comment string in nested language blocks From 0f5f848c7e2176b838af4fc6c37e7bc328883fcf Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 26 Oct 2023 13:47:29 +0000 Subject: [PATCH 3/3] home: firefox: migrate deprecated option --- home/firefox/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/home/firefox/default.nix b/home/firefox/default.nix index 7374b63..85a1d59 100644 --- a/home/firefox/default.nix +++ b/home/firefox/default.nix @@ -33,13 +33,10 @@ in enable = true; package = pkgs.firefox.override { - cfg = { - enableTridactylNative = cfg.tridactyl.enable; - }; - - extraNativeMessagingHosts = with pkgs; ([ ] + nativeMessagingHosts = ([ ] + ++ lib.optional cfg.tridactyl.enable pkgs.tridactyl-native # Watch videos using mpv - ++ lib.optional cfg.ff2mpv.enable ambroisie.ff2mpv-go + ++ lib.optional cfg.ff2mpv.enable pkgs.ambroisie.ff2mpv-go ); };