This commit is contained in:
megit 2024-03-28 02:03:42 +08:00
commit f22207f3e2
16 changed files with 988 additions and 0 deletions

46
flake.nix Normal file
View file

@ -0,0 +1,46 @@
{
description = "Menixvim flake";
inputs = {
nixvim.url = "github:nix-community/nixvim";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
nixvim,
flake-utils,
...
} @ inputs: let
config = import ./config; # import the module directly
in
flake-utils.lib.eachDefaultSystem (system: let
nixvimLib = nixvim.lib.${system};
pkgs = import nixpkgs {inherit system;};
nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = config;
# You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = {
inherit self;
};
};
in {
checks = {
# Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNvim {
inherit nvim;
name = "Menixvim";
};
};
packages = {
# Lets you run `nix run .` to start nixvim
default = nvim;
};
# formatter = pkgs.alejandra;
});
}