nix-community.nixvim/templates/simple/flake.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.3 KiB
Nix
Raw Normal View History

{
description = "A nixvim configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixvim.url = "github:nix-community/nixvim";
2024-01-05 12:19:08 +01:00
flake-parts.url = "github:hercules-ci/flake-parts";
};
2023-07-14 21:44:31 +01:00
outputs =
2024-01-05 12:19:08 +01:00
{ nixvim, flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{ system, ... }:
2024-01-05 12:19:08 +01:00
let
nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system};
nixvimModule = {
inherit system; # or alternatively, set `pkgs`
module = import ./config; # import the module directly
2024-01-05 12:19:08 +01:00
# You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = {
# inherit (inputs) foo;
2024-05-05 19:39:35 +02:00
};
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
2024-05-05 19:39:35 +02:00
in
{
2024-01-05 12:19:08 +01:00
checks = {
# Run `nix flake check .` to verify that your config is not broken
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
2024-01-05 12:19:08 +01:00
};
2024-01-05 12:19:08 +01:00
packages = {
# Lets you run `nix run .` to start nixvim
default = nvim;
2024-05-05 19:39:35 +02:00
};
2024-01-05 12:19:08 +01:00
};
};
}