mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-16 15:30:50 +00:00
Compare commits
2 commits
e614860a12
...
eb6e8b17b7
| Author | SHA1 | Date | |
|---|---|---|---|
|
eb6e8b17b7 |
|||
|
fcc6aa485c |
5 changed files with 29 additions and 17 deletions
|
|
@ -44,12 +44,15 @@ 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"; in {
|
system = "x86_64-linux";
|
||||||
|
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
|
./home.nix # <- your home entrypoint, `programs.nvf.*` may be defined here
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -42,13 +42,12 @@ Followed by importing the NixOS module somewhere in your configuration.
|
||||||
nvf.url = "github:notashelf/nvf";
|
nvf.url = "github:notashelf/nvf";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, nvf, ... }: let
|
outputs = { nixpkgs, nvf, ... }: {
|
||||||
system = "x86_64-linux"; in {
|
|
||||||
# ↓ this is your host output in the flake schema
|
# ↓ this is your host output in the flake schema
|
||||||
nixosConfigurations."yourUsername»" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations."your-hostname" = 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
|
./configuration.nix # <- your host entrypoint, `programs.nvf.*` may be defined here
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,22 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: 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.startPlugins = [pkgs.vimPlugins.vim-wakatime];
|
vim = {
|
||||||
|
startPlugins = [pkgs.vimPlugins.vim-wakatime];
|
||||||
|
|
||||||
vim.pluginRC.vim-wakatime = mkIf (cfg.cli-package != null) ''
|
# Wakatime configuration is stored as vim globals.
|
||||||
vim.g.wakatime_CLIPath = "${cfg.cli-package}"
|
globals = {
|
||||||
'';
|
"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,18 +1,24 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: 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 "vim-wakatime: live code statistics";
|
enable = mkEnableOption ''
|
||||||
|
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;
|
default = pkgs.wakatime-cli;
|
||||||
description = "The package that should be used for wakatime-cli. Set as null to use the default path in `$XDG_DATA_HOME`";
|
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`
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue