-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
flake.nix
69 lines (67 loc) · 2.05 KB
/
flake.nix
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
description = ''
NvChad is Blazing fast Neovim config
providing solid defaults and a beautiful UI https://nvchad.com/
This home manager module will add NvChad configuration to your Nix setup
You can specify in the configuration your own extended configuration
built on the starter repository
You can also add runtime dependencies that will be isolated from the main
system but available to NvChad. This is useful for adding lsp servers.
If you are using your own Neovim build and not from nixpkgs
you can also specify your package.
In addition, you can continue to configure NvChad in the usual way
manually by disabling the hm-activation option
'';
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nvchad-starter = {
url = "github:NvChad/starter/main"; # people who want to use a different starter could override this.
flake = false;
};
};
outputs =
{
self,
nixpkgs,
nvchad-starter,
}:
let
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
in
{
# Executed by `nix build .#<name>`
packages = forAllSystems (
system:
let
pkgs = nixpkgsFor.${system};
in
rec {
nvchad = pkgs.callPackage ./nix/nvchad.nix { starterRepo = "${nvchad-starter}"; };
default = nvchad;
}
);
# Executed by `nix run .#<name>
apps = forAllSystems (system: rec {
nvchad = {
type = "app";
program = "${self.packages.${system}.default}/bin/nvim";
};
default = nvchad;
});
homeManagerModules = rec {
nvchad = import ./nix/module.nix {
inherit nvchad-starter;
};
default = nvchad;
};
homeManagerModule = self.homeManagerModules.nvchad;
checks = self.packages;
};
}