forked from numtide/devshell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
48 lines (43 loc) · 1.33 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
{
description = "devshell";
# To update all inputs:
# $ nix flake update --recreate-lock-file
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.systems.url = "github:nix-systems/default";
outputs = { self, nixpkgs, systems }:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
legacyPackages = eachSystem (system:
import self {
inherit system;
inputs = null;
nixpkgs = nixpkgs.legacyPackages.${system};
}
);
templates = rec {
toml = {
path = ./templates/toml;
description = "nix flake new my-project -t github:numtide/devshell";
};
flake-parts = {
path = ./templates/flake-parts;
description = "nix flake new my-project -t github:numtide/devshell#flake-parts";
};
default = toml;
};
devShells = eachSystem (system: {
default = self.legacyPackages.${system}.fromTOML ./devshell.toml;
});
apps = eachSystem (system: {
default = self.devShells.${system}.default.flakeApp;
});
# Import this overlay into your instance of nixpkgs
overlays.default = import ./overlay.nix;
lib = {
importTOML = import ./nix/importTOML.nix;
};
flakeModule = ./flake-module.nix;
};
}