2023-03-03 09:18:52 +00:00
|
|
|
{
|
|
|
|
description = "A nixvim configuration";
|
|
|
|
|
|
|
|
inputs = {
|
2023-07-14 21:37:21 +01:00
|
|
|
nixvim.url = "github:nix-community/nixvim";
|
2023-03-03 09:18:52 +00:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
|
|
|
|
2023-07-14 21:37:21 +01:00
|
|
|
outputs =
|
|
|
|
{ nixpkgs
|
|
|
|
, nixvim
|
|
|
|
, flake-utils
|
|
|
|
, ...
|
|
|
|
} @ inputs:
|
|
|
|
let
|
|
|
|
config = import ./config; # import the module directly
|
|
|
|
in
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
2023-05-15 11:04:52 +02:00
|
|
|
nixvimLib = nixvim.lib.${system};
|
2023-07-14 21:37:21 +01:00
|
|
|
pkgs = import nixpkgs { inherit system; };
|
2023-03-03 09:18:52 +00:00
|
|
|
nixvim' = nixvim.legacyPackages.${system};
|
|
|
|
nvim = nixvim'.makeNixvimWithModule {
|
|
|
|
inherit pkgs;
|
|
|
|
module = config;
|
|
|
|
};
|
2023-07-14 21:37:21 +01:00
|
|
|
in
|
|
|
|
{
|
2023-03-03 09:18:52 +00:00
|
|
|
checks = {
|
2023-05-15 11:04:52 +02:00
|
|
|
# Run `nix flake check .` to verify that your config is not broken
|
|
|
|
default = nixvimLib.check.mkTestDerivationFromNvim {
|
2023-03-03 09:18:52 +00:00
|
|
|
inherit nvim;
|
|
|
|
name = "A nixvim configuration";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
packages = {
|
|
|
|
# Lets you run `nix run .` to start nixvim
|
|
|
|
default = nvim;
|
|
|
|
};
|
|
|
|
});
|
|
|
|
}
|