DEVELOPMENT ENVIRONMENT

~liljamo/nvim-flake

ref: 199e5581a35e733003728f45204f45d7d3dad791 nvim-flake/flake.nix -rw-r--r-- 1.1 KiB
199e5581Jonni Liljamo feat: add zen-mode and twilight 5 months 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
          ];
        };
      };
    };
}