utility/vim-wakatime: adjust dir name; track via npins & migrate to setupOpts
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate documentation builds-1 (push) Waiting to run
Treewide Checks / Validate documentation builds-2 (push) Waiting to run
Treewide Checks / Validate documentation builds-3 (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I1a292560f7147a390ab28e97b9f1bece6a6a6964
This commit is contained in:
raf 2026-04-19 18:53:10 +03:00
commit 5647ee9f90
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
8 changed files with 68 additions and 47 deletions

View file

@ -358,5 +358,10 @@ in {
[
(mkRenamedOptionModule ["vim" "languages" "ts"] ["vim" "languages" "typescript"])
]
# 2026-04-19
[
(mkRenamedOptionModule ["vim" "utility" "vim-wakatime" "cli-path"] ["vim" "utility" "vim-wakatime" "setupOpts" "cli_path"])
]
];
}

View file

@ -26,7 +26,7 @@
./snacks-nvim
./surround
./telescope
./wakatime
./vim-wakatime
./yanky-nvim
./yazi-nvim
./undotree

View file

@ -0,0 +1,19 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.utility.vim-wakatime;
in {
config = mkIf cfg.enable {
vim = {
lazy.plugins."vim-wakatime" = {
package = "vim-wakatime";
setupModule = "wakatime";
inherit (cfg) setupOpts;
};
};
};
}

View file

@ -0,0 +1,27 @@
{
pkgs,
lib,
...
}: let
inherit (lib.options) mkOption mkEnableOption literalExpression;
inherit (lib.types) str;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.utility.vim-wakatime = {
enable = mkEnableOption ''
automatic time tracking and metrics generated from your programming activity [vim-wakatime]
'';
setupOpts = mkPluginSetupOption "vim-wakatime" {
cli_path = mkOption {
type = str;
default = lib.getExe' pkgs.wakatime-cli "wakatime-cli";
defaultText = literalExpression "lib.getExe' pkgs.wakatime-cli \"wakatime-cli\"";
example = literalExpression "wakatime-cli";
description = ''
Path to wakatime-cli executable. Set to `"wakatime-cli"` to get `wakatime-cli` from {env}`PATH`.
'';
};
};
};
}

View file

@ -1,22 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.meta) getExe;
cfg = config.vim.utility.vim-wakatime;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = [pkgs.vimPlugins.vim-wakatime];
# Wakatime configuration is stored as vim globals.
globals = {
"wakatime_CLIPath" = mkIf (cfg.cli-package != null) "${getExe cfg.cli-package}";
};
};
};
}

View file

@ -1,24 +0,0 @@
{
pkgs,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) nullOr package;
in {
options.vim.utility.vim-wakatime = {
enable = mkEnableOption ''
automatic time tracking and metrics generated from your programming activity [vim-wakatime]
'';
cli-package = mkOption {
type = nullOr package;
default = pkgs.wakatime-cli;
example = null;
description = ''
The package that should be used for wakatime-cli.
Set as null to use the default path in {env}`$XDG_DATA_HOME`
'';
};
};
}

View file

@ -2888,6 +2888,22 @@
"url": "https://github.com/mhinz/vim-startify/archive/4e089dffdad46f3f5593f34362d530e8fe823dcf.tar.gz",
"hash": "sha256-W5N/Dqxf9hSXEEJsrEkXInFwBXNBJe9Dzx9TVS12mPk="
},
"vim-wakatime": {
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "wakatime",
"repo": "vim-wakatime"
},
"pre_releases": false,
"version_upper_bound": null,
"release_prefix": null,
"submodules": false,
"version": "12.0.0",
"revision": "cb7ba055330245b3a9d29f8bb4b82aeb2d52e580",
"url": "https://api.github.com/repos/wakatime/vim-wakatime/tarball/refs/tags/12.0.0",
"hash": "sha256-3D+07D3NKndFeTSNMJiG1HJl5Cv5/GjWJUU+6FOSI/k="
},
"which-key-nvim": {
"type": "Git",
"repository": {