This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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}")
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user