feat(nvim): nixify theming (and add 'vscode' theme)
check / lint (push) Successful in 17s

This commit is contained in:
2026-08-25 23:46:47 +02:00
parent 5f8f8c4251
commit 4004d9e361
8 changed files with 134 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;
+26 -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,15 @@
PAGER = "nvimpager";
MANWIDTH = "80";
};
packages = with pkgs; [
inputs.nvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim
nvimpager
];
packages = with pkgs; [ nvimpager ];
};
xdg.configFile."nvimpager/init.lua".text = ''
vim.opt.clipboard = "unnamedplus"
vim.opt.background = "dark"
vim.g.zenwritten_compat = 1
${lib.concatMapStringsSep "\n" (plugin: ''vim.opt.runtimepath:append("${plugin}")'') plugins}
vim.cmd.colorscheme("${config.nvim.colorscheme}")
'';
};
}