mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-16 23:35:13 +00:00
Compare commits
No commits in common. "eb6e8b17b7beffd3792d898e30b0e9cd80de06ae" and "e614860a126b0de8feb6e1e5e9bc682f7840d1c5" have entirely different histories.
eb6e8b17b7
...
e614860a12
5 changed files with 17 additions and 29 deletions
|
|
@ -44,15 +44,12 @@ Followed by importing the home-manager module somewhere in your configuration.
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, home-manager, nvf, ... }: let
|
outputs = { nixpkgs, home-manager, nvf, ... }: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux"; in {
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in {
|
|
||||||
# ↓ this is your home output in the flake schema, expected by home-manager
|
# ↓ this is your home output in the flake schema, expected by home-manager
|
||||||
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
|
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration
|
||||||
inherit pkgs;
|
|
||||||
modules = [
|
modules = [
|
||||||
nvf.homeManagerModules.default # <- this imports the home-manager module that provides the options
|
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
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -42,12 +42,13 @@ Followed by importing the NixOS module somewhere in your configuration.
|
||||||
nvf.url = "github:notashelf/nvf";
|
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
|
# ↓ this is your host output in the flake schema
|
||||||
nixosConfigurations."your-hostname" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations."yourUsername»" = nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
nvf.nixosModules.default # <- this imports the NixOS module that provides the options
|
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
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,18 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.meta) getExe;
|
|
||||||
|
|
||||||
cfg = config.vim.utility.vim-wakatime;
|
cfg = config.vim.utility.vim-wakatime;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim.startPlugins = [pkgs.vimPlugins.vim-wakatime];
|
||||||
startPlugins = [pkgs.vimPlugins.vim-wakatime];
|
|
||||||
|
|
||||||
# Wakatime configuration is stored as vim globals.
|
vim.pluginRC.vim-wakatime = mkIf (cfg.cli-package != null) ''
|
||||||
globals = {
|
vim.g.wakatime_CLIPath = "${cfg.cli-package}"
|
||||||
"wakatime_CLIPath" = mkIf (cfg.cli-package != null) "${getExe cfg.cli-package}";
|
'';
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
_: {
|
||||||
imports = [
|
imports = [
|
||||||
./config.nix
|
./config.nix
|
||||||
./vim-wakatime.nix
|
./vim-wakatime.nix
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,18 @@
|
||||||
{
|
{
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.types) nullOr package;
|
inherit (lib.types) nullOr package;
|
||||||
in {
|
in {
|
||||||
options.vim.utility.vim-wakatime = {
|
options.vim.utility.vim-wakatime = {
|
||||||
enable = mkEnableOption ''
|
enable = mkEnableOption "vim-wakatime: live code statistics";
|
||||||
automatic time tracking and metrics generated from your programming activity [vim-wakatime]
|
|
||||||
'';
|
|
||||||
|
|
||||||
cli-package = mkOption {
|
cli-package = mkOption {
|
||||||
type = nullOr package;
|
type = nullOr package;
|
||||||
default = pkgs.wakatime-cli;
|
default = pkgs.wakatime;
|
||||||
example = null;
|
description = "The package that should be used for wakatime-cli. Set as null to use the default path in `$XDG_DATA_HOME`";
|
||||||
description = ''
|
|
||||||
The package that should be used for wakatime-cli.
|
|
||||||
Set as null to use the default path in {env}`$XDG_DATA_HOME`
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue