first commit

This commit is contained in:
Louis Chih-Ming Lee 2026-01-26 01:16:35 +01:00
commit 2a3ea31491
52 changed files with 2991 additions and 0 deletions

113
apps/neovim/default.nix Normal file
View file

@ -0,0 +1,113 @@
{ config, pkgs, inputs, my-r,... }:
let
nvim-config-store = builtins.filterSource (path: type: baseNameOf path != "default.nix") ./.;
nvim-config-files = builtins.attrNames (builtins.readDir nvim-config-store);
nvim-config-lis = map (path: builtins.readFile "${nvim-config-store}/${path}") (nvim-config-files);
nvim-config = builtins.concatStringsSep "\n" nvim-config-lis;
in
{
programs.neovim = {
enable = true;
defaultEditor = true;
plugins = with pkgs.vimPlugins; [
nvim-treesitter.withAllGrammars
nvim-lspconfig
telescope-nvim
nvim-cmp
cmp-nvim-lsp
nvim-tree-lua
which-key-nvim
trouble-nvim
kanagawa-nvim
lazygit-nvim
quarto-nvim
otter-nvim
otter-nvim
image-nvim
molten-nvim
toggleterm-nvim
markdown-preview-nvim
lualine-nvim
gitsigns-nvim
indent-blankline-nvim
guess-indent-nvim
nvim-autopairs
catppuccin-nvim
];
extraLuaConfig = nvim-config;
extraPackages = with pkgs; [
#quarto
pyright
ripgrep
lua-language-server
rust-analyzer
lazygit
tectonic
imagemagick
jupyter
pnglatex
nil
nixfmt
rustc
cargo
rustfmt
clippy
rust-analyzer
];
extraLuaPackages = p: with p; [
magick
];
extraPython3Packages = ps: with ps; [
pynvim
jupyter-client
cairosvg
pnglatex
plotly
pyperclip
ipython
nbformat
];
};
xdg.dataFile."jupyter/kernels/ir-nix/kernel.json".text = ''
{
"argv": [
"${my-r.env}/bin/R",
"--slave",
"-e",
"IRkernel::main()",
"--args",
"{connection_file}"
],
"display_name": "R (nix)",
"language": "R"
}
'';
home.file.".Rprofile".text = ''
graphics::par(bg = "white")
options(
jupyter.rich_display = TRUE,
#jupyter.display_mimetypes = c("text/plain", "image/png", "text/latex"),
jupyter.display_mimetypes = c("text/plain", "image/png"),
jupyter.plot_mimetypes = "image/png"
)
'';
#sessionVariables = {
# EDITOR = "nvim";
# VISUAL = "nvim";
#};
}