Compare commits

..

No commits in common. "eb6e8b17b7beffd3792d898e30b0e9cd80de06ae" and "e614860a126b0de8feb6e1e5e9bc682f7840d1c5" have entirely different histories.

5 changed files with 17 additions and 29 deletions

View file

@ -44,15 +44,12 @@ Followed by importing the home-manager module somewhere in your configuration.
};
outputs = { nixpkgs, home-manager, nvf, ... }: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
system = "x86_64-linux"; in {
# ↓ this is your home output in the flake schema, expected by home-manager
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration
modules = [
nvf.homeManagerModules.default # <- this imports the home-manager module that provides the options
./home.nix # <- your home entrypoint, `programs.nvf.*` may be defined here
./home.nix # <- your home entrypoint
];
};
};

View file

@ -42,12 +42,13 @@ Followed by importing the NixOS module somewhere in your configuration.
nvf.url = "github:notashelf/nvf";
};
outputs = { nixpkgs, nvf, ... }: {
outputs = { nixpkgs, nvf, ... }: let
system = "x86_64-linux"; in {
# ↓ this is your host output in the flake schema
nixosConfigurations."your-hostname" = nixpkgs.lib.nixosSystem {
nixosConfigurations."yourUsername»" = nixpkgs.lib.nixosSystem {
modules = [
nvf.nixosModules.default # <- this imports the NixOS module that provides the options
./configuration.nix # <- your host entrypoint, `programs.nvf.*` may be defined here
./configuration.nix # <- your host entrypoint
];
};
};

View file

@ -1,22 +1,18 @@
{
config,
pkgs,
lib,
pkgs,
...
}: 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];
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}";
};
};
vim.pluginRC.vim-wakatime = mkIf (cfg.cli-package != null) ''
vim.g.wakatime_CLIPath = "${cfg.cli-package}"
'';
};
}

View file

@ -1,4 +1,4 @@
{
_: {
imports = [
./config.nix
./vim-wakatime.nix

View file

@ -1,24 +1,18 @@
{
pkgs,
lib,
pkgs,
...
}: 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]
'';
enable = mkEnableOption "vim-wakatime: live code statistics";
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`
'';
default = pkgs.wakatime;
description = "The package that should be used for wakatime-cli. Set as null to use the default path in `$XDG_DATA_HOME`";
};
};
}