Link: https://github.com/nix-community/stylix/pull/1535 Tested-by: Adam M. Szalkowski <a.szalkowski@datahow.ch> Approved-by: Adam M. Szalkowski <a.szalkowski@datahow.ch> Co-authored-by: Shahar "Dawn" Or <mightyiampresence@gmail.com> Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com> Tested-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
64 lines
1.3 KiB
Nix
64 lines
1.3 KiB
Nix
mkTarget:
|
|
{
|
|
lib,
|
|
options,
|
|
...
|
|
}:
|
|
mkTarget {
|
|
name = "nvf";
|
|
humanName = "nvf";
|
|
extraOptions = {
|
|
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";
|
|
};
|
|
|
|
configElements = lib.optionals (options.programs ? nvf) [
|
|
(
|
|
{ colors, cfg }:
|
|
{
|
|
programs.nvf.settings.vim = {
|
|
theme = {
|
|
enable = true;
|
|
name = cfg.plugin;
|
|
base16-colors = {
|
|
inherit (colors.withHashtag)
|
|
base00
|
|
base01
|
|
base02
|
|
base03
|
|
base04
|
|
base05
|
|
base06
|
|
base07
|
|
base08
|
|
base09
|
|
base0A
|
|
base0B
|
|
base0C
|
|
base0D
|
|
base0E
|
|
base0F
|
|
;
|
|
};
|
|
};
|
|
statusline = lib.mkIf (cfg.plugin == "base16") {
|
|
lualine.theme = "base16";
|
|
};
|
|
};
|
|
}
|
|
)
|
|
(
|
|
{ cfg }:
|
|
{
|
|
programs.nvf.settings.vim.theme.transparent = cfg.transparentBackground;
|
|
}
|
|
)
|
|
];
|
|
}
|