From f7b371dfd4f6a902dfff3a82397d317178e8f0d0 Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L de Mello" Date: Wed, 23 Jul 2025 23:32:20 -0300 Subject: [PATCH] feat(integrations): new activitywatch integration --- home.nix | 5 ++- lua/dot013/plugins/init.lua | 1 + lua/dot013/plugins/integrations.lua | 13 ++++++++ nixos.nix | 5 ++- package.nix | 49 +++++++++++++++++------------ 5 files changed, 47 insertions(+), 26 deletions(-) create mode 100644 lua/dot013/plugins/integrations.lua diff --git a/home.nix b/home.nix index 489f7ab..53a3e6d 100644 --- a/home.nix +++ b/home.nix @@ -1,10 +1,10 @@ {self}: { config, + osConfig, lib, pkgs, ... }: let - neovim = self.packages.${pkgs.system}.default; cfg = config.neovim; in with lib; { @@ -15,7 +15,7 @@ in }; package = mkOption { type = with types; package; - default = neovim; + default = self.packages.${pkgs.system}.default; }; vimdiffAlias = mkOption { type = with types; bool; @@ -28,7 +28,6 @@ in }; config = mkIf cfg.enable { home.sessionVariables = {EDITOR = "nvim";}; - home.packages = [cfg.package]; programs.bash.shellAliases = mkIf cfg.vimdiffAlias {vimdiff = "nvim -d";}; diff --git a/lua/dot013/plugins/init.lua b/lua/dot013/plugins/init.lua index 5d4772e..eb288e8 100644 --- a/lua/dot013/plugins/init.lua +++ b/lua/dot013/plugins/init.lua @@ -3,6 +3,7 @@ return { { import = "dot013.plugins.debugger" }, { import = "dot013.plugins.formatting" }, { import = "dot013.plugins.ide" }, + { import = "dot013.plugins.integrations" }, { import = "dot013.plugins.lsp" }, { import = "dot013.plugins.navigation" }, { import = "dot013.plugins.treesitter" }, diff --git a/lua/dot013/plugins/integrations.lua b/lua/dot013/plugins/integrations.lua new file mode 100644 index 0000000..edc23aa --- /dev/null +++ b/lua/dot013/plugins/integrations.lua @@ -0,0 +1,13 @@ +return { + { + "aw-watcher.nvim", + after = function() + require("aw_watcher").setup({ + aw_server = { + host = "100.69.8.56", + port = 5600, + } + }) + end + } +} diff --git a/nixos.nix b/nixos.nix index f026ee0..aa10e05 100644 --- a/nixos.nix +++ b/nixos.nix @@ -4,7 +4,6 @@ pkgs, ... }: let - neovim = self.packages.${pkgs.system}.default; cfg = config.neovim; in with lib; { @@ -15,7 +14,8 @@ in }; package = mkOption { type = with types; package; - default = neovim; + default = self.packages.${pkgs.system}.default; + readOnly = true; }; defaultEditor = mkOption { type = with types; bool; @@ -24,7 +24,6 @@ in }; config = mkIf cfg.enable { environment.variables = {EDITOR = "nvim";}; - environment.systemPackages = [cfg.package]; # Disable NixOS's Neovim diff --git a/package.nix b/package.nix index 319c6a4..92ed12b 100644 --- a/package.nix +++ b/package.nix @@ -2,32 +2,32 @@ pkgs, lib, neovim ? pkgs.neovim, + blink-cmp ? pkgs.vimPlugins.blink-cmp, ripgrep ? pkgs.ripgrep, mdfmt ? null, go-grip ? null, yazi ? pkgs.yazi, ... -} @ args: let - start = with pkgs.vimPlugins; [ - ( - if args ? blink-cmp - then args.blink-cmp - else blink-cmp - ) - catppuccin-nvim - indent-blankline-nvim - lze - nvim-lspconfig - nvim-treesitter.withAllGrammars - nvim-treesitter-textobjects - nvim-treesitter-textsubjects +}: let + start = + (with pkgs.vimPlugins; [ + catppuccin-nvim + indent-blankline-nvim + lze + nvim-lspconfig + nvim-treesitter.withAllGrammars + nvim-treesitter-textobjects + nvim-treesitter-textsubjects - ((pkgs.vimUtils.buildVimPlugin { - name = "dot013.nvim"; - src = ./.; - }) - .overrideAttrs {doCheck = false;}) - ]; + ((pkgs.vimUtils.buildVimPlugin { + name = "dot013.nvim"; + src = ./.; + }) + .overrideAttrs {doCheck = false;}) + ]) + ++ [ + blink-cmp + ]; opt = with pkgs.vimPlugins; [ auto-save-nvim auto-session @@ -56,6 +56,15 @@ tmux-nvim vim-sleuth + (pkgs.vimUtils.buildVimPlugin { + pname = "aw-watcher.nvim"; + version = "master"; + src = fetchGit { + url = "https://github.com/lowitea/aw-watcher.nvim"; + rev = "be7b03748f59b6602502baf08e7f7736cc7279a5"; + }; + }) + (pkgs.vimUtils.buildVimPlugin { pname = "nvim-emmet"; version = "v0.4.4";