make home configs work
This commit is contained in:
parent
f0c21b2e79
commit
30f81b2b79
29 changed files with 2131 additions and 2033 deletions
|
|
@ -1,155 +1,158 @@
|
|||
_: {
|
||||
custom.program.nvim.requirements = [ "cli" ];
|
||||
custom.program.nvim.home-config =
|
||||
{
|
||||
pkgs,
|
||||
flakes,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nvim_mime_types = [
|
||||
"application/x-zerosize"
|
||||
"text/english"
|
||||
"text/plain"
|
||||
"text/x-makefile"
|
||||
"text/x-c++hdr"
|
||||
"text/x-c++src"
|
||||
"text/x-chdr"
|
||||
"text/x-csrc"
|
||||
"text/x-java"
|
||||
"text/x-moc"
|
||||
"text/x-pascal"
|
||||
"text/x-tcl"
|
||||
"text/x-tex"
|
||||
"application/x-shellscript"
|
||||
"text/x-c"
|
||||
"text/x-c++"
|
||||
];
|
||||
desktop-entry-name = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanvim";
|
||||
desktop-entry = pkgs.makeDesktopItem {
|
||||
name = desktop-entry-name;
|
||||
desktopName = "neovim";
|
||||
exec = "${./editor-hax.py} %F";
|
||||
tryExec = "${./editor-hax.py}";
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
categories = [
|
||||
"Utility"
|
||||
"TextEditor"
|
||||
{ machine, ... }:
|
||||
{
|
||||
custom.program.nvim = machine.program {
|
||||
requirements = [ "cli" ];
|
||||
home-config =
|
||||
{
|
||||
pkgs,
|
||||
flakes,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nvim_mime_types = [
|
||||
"application/x-zerosize"
|
||||
"text/english"
|
||||
"text/plain"
|
||||
"text/x-makefile"
|
||||
"text/x-c++hdr"
|
||||
"text/x-c++src"
|
||||
"text/x-chdr"
|
||||
"text/x-csrc"
|
||||
"text/x-java"
|
||||
"text/x-moc"
|
||||
"text/x-pascal"
|
||||
"text/x-tcl"
|
||||
"text/x-tex"
|
||||
"application/x-shellscript"
|
||||
"text/x-c"
|
||||
"text/x-c++"
|
||||
];
|
||||
icon = "terminal";
|
||||
mimeTypes = nvim_mime_types;
|
||||
};
|
||||
in
|
||||
{
|
||||
home = {
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
desktop-entry-name = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanvim";
|
||||
desktop-entry = pkgs.makeDesktopItem {
|
||||
name = desktop-entry-name;
|
||||
desktopName = "neovim";
|
||||
exec = "${./editor-hax.py} %F";
|
||||
tryExec = "${./editor-hax.py}";
|
||||
terminal = false;
|
||||
type = "Application";
|
||||
categories = [
|
||||
"Utility"
|
||||
"TextEditor"
|
||||
];
|
||||
icon = "terminal";
|
||||
mimeTypes = nvim_mime_types;
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".local/share/applications/${desktop-entry-name}.desktop" = {
|
||||
source = "${desktop-entry}/share/applications/${desktop-entry-name}.desktop";
|
||||
};
|
||||
|
||||
xdg.mimeApps.associations.added = lib.mergeAttrsList (
|
||||
map (mime: {
|
||||
${mime} = [ "${desktop-entry-name}.desktop" ];
|
||||
}) nvim_mime_types
|
||||
);
|
||||
|
||||
imports = [
|
||||
flakes.nixvim.homeModules.nixvim
|
||||
./options.nix
|
||||
./plugins.nix
|
||||
./keys.nix
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
globals.mapleader = " ";
|
||||
globals.maplocalleader = " ";
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
# Highlight and remove extra white spaces
|
||||
# same color as cursorline as per
|
||||
# https://github.com/joshdick/onedark.vim/blob/390b893d361c356ac1b00778d849815f2aa44ae4/autoload/onedark.vim
|
||||
highlight.ExtraWhitespace.bg = "#2C323C";
|
||||
match.ExtraWhitespace = "\\s\\+$";
|
||||
|
||||
clipboard.providers.wl-copy.enable = true;
|
||||
|
||||
performance = {
|
||||
byteCompileLua.enable = true;
|
||||
combinePlugins = {
|
||||
enable = true;
|
||||
|
||||
standalonePlugins = [
|
||||
# clashes with lualine
|
||||
"onedark.nvim"
|
||||
];
|
||||
in
|
||||
{
|
||||
home = {
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
|
||||
extraLuaPackages = ps: [ ps.magick ];
|
||||
extraPackages = [ pkgs.imagemagick ];
|
||||
home.file.".local/share/applications/${desktop-entry-name}.desktop" = {
|
||||
source = "${desktop-entry}/share/applications/${desktop-entry-name}.desktop";
|
||||
};
|
||||
|
||||
# package = (import inputs.unstable { inherit (pkgs) system; }).neovim-unwrapped;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
xdg.mimeApps.associations.added = lib.mergeAttrsList (
|
||||
map (mime: {
|
||||
${mime} = [ "${desktop-entry-name}.desktop" ];
|
||||
}) nvim_mime_types
|
||||
);
|
||||
|
||||
colorschemes.onedark = {
|
||||
imports = [
|
||||
flakes.nixvim.homeModules.nixvim
|
||||
./options.nix
|
||||
./plugins.nix
|
||||
./keys.nix
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
style = "deep";
|
||||
globals.mapleader = " ";
|
||||
globals.maplocalleader = " ";
|
||||
|
||||
highlights = {
|
||||
# bright green doccomments
|
||||
"@lsp.type.comment".fg = "#77B767";
|
||||
"@comment.documentation.rust".fg = "#77B767";
|
||||
"@comment.documentation".fg = "#77B767";
|
||||
"@comment".fg = "#426639";
|
||||
# "Visual".bg = "#2a2e36";
|
||||
# "Cursorline".bg = "#2a2e36";
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
# Highlight and remove extra white spaces
|
||||
# same color as cursorline as per
|
||||
# https://github.com/joshdick/onedark.vim/blob/390b893d361c356ac1b00778d849815f2aa44ae4/autoload/onedark.vim
|
||||
highlight.ExtraWhitespace.bg = "#2C323C";
|
||||
match.ExtraWhitespace = "\\s\\+$";
|
||||
|
||||
clipboard.providers.wl-copy.enable = true;
|
||||
|
||||
performance = {
|
||||
byteCompileLua.enable = true;
|
||||
combinePlugins = {
|
||||
enable = true;
|
||||
|
||||
standalonePlugins = [
|
||||
# clashes with lualine
|
||||
"onedark.nvim"
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
extraLuaPackages = ps: [ ps.magick ];
|
||||
extraPackages = [ pkgs.imagemagick ];
|
||||
|
||||
# package = (import inputs.unstable { inherit (pkgs) system; }).neovim-unwrapped;
|
||||
package = pkgs.neovim-unwrapped;
|
||||
|
||||
colorschemes.onedark = {
|
||||
enable = true;
|
||||
settings = {
|
||||
style = "deep";
|
||||
|
||||
highlights = {
|
||||
# bright green doccomments
|
||||
"@lsp.type.comment".fg = "#77B767";
|
||||
"@comment.documentation.rust".fg = "#77B767";
|
||||
"@comment.documentation".fg = "#77B767";
|
||||
"@comment".fg = "#426639";
|
||||
# "Visual".bg = "#2a2e36";
|
||||
# "Cursorline".bg = "#2a2e36";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
extraConfigLuaPre = ''
|
||||
require("neoconf").setup({})
|
||||
'';
|
||||
extraConfigLua = ''
|
||||
require("render-markdown").setup {
|
||||
latex_converter = '${pkgs.python312Packages.pylatexenc}/bin/latex2text',
|
||||
}
|
||||
''
|
||||
|
||||
# local lspconfig = require 'lspconfig'
|
||||
# local configs = require 'lspconfig.configs'
|
||||
# if not configs.foo_lsp then
|
||||
# configs.noteslsp = {
|
||||
# default_config = {
|
||||
# -- cmd = {'${pkgs.custom.noteslsp}/bin/noteslsp'},
|
||||
# cmd = {'./noteslsp/target/debug/noteslsp'},
|
||||
# filetypes = {'markdown'},
|
||||
# root_dir = function(fname)
|
||||
# return lspconfig.util.find_git_ancestor(fname)
|
||||
# end,
|
||||
# settings = {}
|
||||
# ,
|
||||
# },
|
||||
# }
|
||||
# end
|
||||
#
|
||||
# lspconfig.noteslsp.setup{}
|
||||
# ''
|
||||
+ (builtins.readFile ./config.lua);
|
||||
extraConfigLuaPost = ''
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfigLuaPre = ''
|
||||
require("neoconf").setup({})
|
||||
'';
|
||||
extraConfigLua = ''
|
||||
require("render-markdown").setup {
|
||||
latex_converter = '${pkgs.python312Packages.pylatexenc}/bin/latex2text',
|
||||
}
|
||||
''
|
||||
|
||||
# local lspconfig = require 'lspconfig'
|
||||
# local configs = require 'lspconfig.configs'
|
||||
# if not configs.foo_lsp then
|
||||
# configs.noteslsp = {
|
||||
# default_config = {
|
||||
# -- cmd = {'${pkgs.custom.noteslsp}/bin/noteslsp'},
|
||||
# cmd = {'./noteslsp/target/debug/noteslsp'},
|
||||
# filetypes = {'markdown'},
|
||||
# root_dir = function(fname)
|
||||
# return lspconfig.util.find_git_ancestor(fname)
|
||||
# end,
|
||||
# settings = {}
|
||||
# ,
|
||||
# },
|
||||
# }
|
||||
# end
|
||||
#
|
||||
# lspconfig.noteslsp.setup{}
|
||||
# ''
|
||||
+ (builtins.readFile ./config.lua);
|
||||
extraConfigLuaPost = ''
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue