nvf: init (#939)

Link: https://github.com/danth/stylix/pull/939

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
Adam M. Szalkowski 2025-03-07 09:22:25 +01:00 committed by GitHub
parent 4853879264
commit 6fada03cd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 63 additions and 0 deletions

1
modules/nvf/darwin.nix Normal file
View file

@ -0,0 +1 @@
import ./nvf.nix

1
modules/nvf/hm.nix Normal file
View file

@ -0,0 +1 @@
import ./nvf.nix

1
modules/nvf/nixos.nix Normal file
View file

@ -0,0 +1 @@
import ./nvf.nix

60
modules/nvf/nvf.nix Normal file
View file

@ -0,0 +1,60 @@
{
config,
lib,
options,
...
}:
let
cfg = config.stylix.targets.nvf;
in
{
options.stylix.targets.nvf = {
enable = config.lib.stylix.mkEnableTarget "nvf" true;
plugin = lib.mkOption {
type = lib.types.enum [
"base16"
"mini-base16"
];
default = "base16";
description = "Plugin used for the colorscheme";
};
transparentBackground = lib.mkEnableOption "background transparency for the main Neovim window";
};
config =
lib.mkIf (config.stylix.enable && cfg.enable && options.programs ? nvf)
(
lib.optionalAttrs (options.programs ? nvf) {
programs.nvf.settings.vim = {
theme = {
enable = true;
name = cfg.plugin;
base16-colors = {
inherit (config.lib.stylix.colors.withHashtag)
base00
base01
base02
base03
base04
base05
base06
base07
base08
base09
base0A
base0B
base0C
base0D
base0E
base0F
;
};
transparent = cfg.transparentBackground;
};
statusline = lib.mkIf (cfg.plugin == "base16") {
lualine.theme = "base16";
};
};
}
);
}