-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
32 lines (30 loc) · 1.15 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
{
description = "Description for the project";
inputs = {
std.url = "github:divnix/std";
nixpkgs.follows = "std/nixpkgs";
};
outputs = { std, self, ...} @ inputs: std.growOn {
inherit inputs;
# 1. Each folder inside `cellsFrom` becomes a "Cell"
# Run for example: 'mkdir nix/mycell'
# 2. Each <block>.nix or <block>/default.nix within it becomes a "Cell Block"
# Run for example: '$EDITOR nix/mycell/packages.nix' - see example content below
cellsFrom = ./nix;
# 3. Only blocks with these names [here: "packages" & "devshells"] are picked up by Standard
# It's a bit like the output type system of your flake project (hint: CLI & TUI!!)
cellBlocks = with std.blockTypes; [
(installables "packages" {ci.build = true;})
(devshells "devshells" {ci.build = true;})
];
}
# 4. Run 'nix run github:divnix/std'
# 'growOn' ... Soil:
# - here, compat for the Nix CLI
# - but can use anything that produces flake outputs (e.g. flake-parts or flake-utils)
# 5. Run: nix run .
{
devShells = std.harvest self ["mycell" "devshells"];
packages = std.harvest self ["mycell" "packages"];
};
}