DEVELOPMENT ENVIRONMENT

~liljamo/nvim-flake

ref: 5fc3e3c83ba2f044334653ba01aabbf9054d08e9 nvim-flake/flake.nix -rw-r--r-- 1.1 KiB
5fc3e3c8Jonni Liljamo feat(lsp): pylsp 12 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
    flake-parts.url = "github:hercules-ci/flake-parts";
    nixvim = {
      url = "github:nix-community/nixvim";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = inputs @ {
    self,
    nixpkgs,
    flake-parts,
    nixvim,
  }:
    flake-parts.lib.mkFlake {
      inherit inputs;
    } {
      systems = [
        "x86_64-linux"
      ];

      perSystem = {
        pkgs,
        system,
        ...
      }: let
        nvLib = nixvim.lib.${system};
        nv = nixvim.legacyPackages.${system};
        nvModule = {
          inherit pkgs;
          module = import ./config;
        };
        nvim = nv.makeNixvimWithModule nvModule;
      in {
        checks.default = nvLib.check.mkTestDerivationFromNixvimModule nvModule;
        packages = {
          inherit nvim;
          default = nvim;
        };

        devShells.default = pkgs.mkShell {
          buildInputs = [
            nvim

            pkgs.nil
            pkgs.alejandra
          ];
        };
      };
    };
}