-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
52 lines (48 loc) · 1.43 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
{
description = "devkit flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
angular-language-server.url = "github:csvenke/angular-language-server-flake";
};
outputs = inputs@{ flake-parts, nixpkgs, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = nixpkgs.lib.systems.flakeExposed;
imports = [
inputs.flake-parts.flakeModules.easyOverlay
];
perSystem = { system, ... }:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
inputs.angular-language-server.overlays.default
];
};
inherit (builtins) readDir mapAttrs;
inherit (pkgs.lib) pipe;
inherit (pkgs.lib.attrsets) filterAttrs;
callPackages = path:
pipe path [
readDir
(filterAttrs (_: value: value == "directory"))
(mapAttrs (name: _: pkgs.callPackage "${path}/${name}" { }))
];
in
{
overlayAttrs = {
devkit = callPackages ./packages;
};
packages = callPackages ./packages;
devShells = callPackages ./devShells;
};
flake = {
templates = {
default = {
path = ./templates/default;
description = "Default template";
};
};
};
};
}