init
This commit is contained in:
commit
1e2ca5a6fc
71 changed files with 3330 additions and 0 deletions
96
flake-modules/nixvim.nix
Normal file
96
flake-modules/nixvim.nix
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
imports = [ inputs.devshell.flakeModule ];
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
self',
|
||||
inputs',
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nixvim' = inputs'.nixvim.legacyPackages;
|
||||
lib = inputs.nixpkgs.lib;
|
||||
# https://nix-community.github.io/nixvim/modules/standalone.html
|
||||
nixvimModule = variant: {
|
||||
inherit pkgs;
|
||||
module = import ../config {
|
||||
inherit lib;
|
||||
inherit system;
|
||||
inherit variant;
|
||||
};
|
||||
# You can use `extraSpecialArgs` to pass additional arguments to your module files
|
||||
extraSpecialArgs = {
|
||||
inherit (inputs) self;
|
||||
inherit variant;
|
||||
inherit system; # used in nixd and csvview-nvim
|
||||
inherit inputs; # used in csvview-nvim, before the package merged into nixos-24.11
|
||||
};
|
||||
};
|
||||
makeNixvimFunction = variant: nixvim'.makeNixvimWithModule (nixvimModule variant);
|
||||
in
|
||||
{
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
# remove this and use nixos-25.05 to accelerate evaluation time
|
||||
# # https://haseebmajid.dev/posts/2024-04-21-til-how-to-fix-neorg-metadata-treesitter-issues-with-nixvim/
|
||||
# no need to use neorg-overlay after adding treesitter in ./config/plugins/neorg.nix
|
||||
#
|
||||
# inputs.neorg-overlay.overlays.default
|
||||
(final: prev: {
|
||||
nvim-full = makeNixvimFunction "full";
|
||||
nvim-lite = makeNixvimFunction "lite";
|
||||
nvim-normal = makeNixvimFunction "normal";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
packages = {
|
||||
# Lets you run `nix run .` to start nixvim
|
||||
default = self'.packages.nvim-full;
|
||||
|
||||
# nvim-full = pkgs.symlinkJoin {
|
||||
# name = "nvim-full";
|
||||
# paths = [
|
||||
# (pkgs.writeShellScriptBin "nvim-full" ''
|
||||
# exec ${pkgs.nvim-full}/bin/nvim "$@"
|
||||
# '')
|
||||
# (pkgs.writeShellScriptBin "nixvim-print-init-full" ''
|
||||
# exec ${pkgs.nvim-full}/bin/nixvim-print-init "$@"
|
||||
# '')
|
||||
# ];
|
||||
# };
|
||||
# nvim-normal = pkgs.symlinkJoin {
|
||||
# name = "nvim-normal";
|
||||
# paths = [
|
||||
# (pkgs.writeShellScriptBin "nvim-normal" ''
|
||||
# exec ${pkgs.nvim-normal}/bin/nvim "$@"
|
||||
# '')
|
||||
# (pkgs.writeShellScriptBin "nixvim-print-init-normal" ''
|
||||
# exec ${pkgs.nvim-normal}/bin/nixvim-print-init "$@"
|
||||
# '')
|
||||
# ];
|
||||
# };
|
||||
# nvim-lite = pkgs.symlinkJoin {
|
||||
# name = "nvim-lite";
|
||||
# paths = [
|
||||
# (pkgs.writeShellScriptBin "nvim-lite" ''
|
||||
# exec ${pkgs.nvim-lite}/bin/nvim "$@"
|
||||
# '')
|
||||
# (pkgs.writeShellScriptBin "nixvim-print-init-lite" ''
|
||||
# exec ${pkgs.nvim-lite}/bin/nixvim-print-init "$@"
|
||||
# '')
|
||||
# ];
|
||||
# };
|
||||
nvim-full = pkgs.nvim-full;
|
||||
nvim-normal = pkgs.nvim-normal;
|
||||
nvim-lite = pkgs.nvim-lite;
|
||||
};
|
||||
devshells.default = {
|
||||
packages = [ self'.packages.nvim-full ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue