feat(nvim): nixify theming (and add 'vscode' theme)
check / lint (push) Failing after 15s

This commit is contained in:
2026-08-25 23:29:37 +02:00
parent 5f8f8c4251
commit be15e8ba00
9 changed files with 148 additions and 82 deletions
+4 -1
View File
@@ -70,7 +70,10 @@
music.enable = true;
my.dconf.enable = true;
my.stylix.enable = true;
nvim.enable = true;
nvim = {
enable = true;
colorscheme = "vscode";
};
pandoc.enable = true;
shell.enable = true;
taskwarrior.enable = true;
+32 -8
View File
@@ -1,15 +1,28 @@
{
config,
lib,
pkgs,
inputs,
pkgs,
lib,
config,
...
}:
let
themes = import "${inputs.nvim}/themes.nix" pkgs;
plugins = themes.${config.nvim.colorscheme};
in
{
options.nvim.enable = lib.mkEnableOption "nvim";
imports = [ inputs.nvim.homeModules.default ];
options.nvim.colorscheme = lib.mkOption {
type = lib.types.enum (lib.attrNames themes);
default = "zenwritten";
};
config = lib.mkIf config.nvim.enable {
nvim.packageDefinitions.merge.nvim = _: {
categories.colorscheme = config.nvim.colorscheme;
};
home = {
sessionVariables = {
EDITOR = "nvim";
@@ -19,10 +32,21 @@
PAGER = "nvimpager";
MANWIDTH = "80";
};
packages = with pkgs; [
inputs.nvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim
nvimpager
];
packages = with pkgs; [ nvimpager ];
};
xdg.configFile =
lib.listToAttrs (
map (
package: lib.nameValuePair "nvimpager/pack/themes/opt/${package.pname}" { source = package; }
) plugins
)
// {
"nvimpager/init.lua".text = ''
vim.g.theme = "${config.nvim.colorscheme}"
vim.g.theme_packs = ${lib.generators.toLua { } (map (package: package.pname) plugins)}
dofile("${./nvimpager.lua}")
'';
};
};
}
+8
View File
@@ -0,0 +1,8 @@
vim.opt.clipboard = "unnamedplus"
vim.opt.background = "dark"
vim.g.zenwritten_compat = 1
for _, pack in ipairs(vim.g.theme_packs) do
vim.cmd.packadd(pack)
end
vim.cmd.colorscheme(vim.g.theme)