-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
58 lines (56 loc) · 1.37 KB
/
Copy pathflake.nix
File metadata and controls
58 lines (56 loc) · 1.37 KB
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
{
description = "Lux documentation site";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
lux.url = "github:lumen-oss/lux";
};
outputs = inputs @ {
self,
nixpkgs,
...
}: let
lib = with nixpkgs.lib;
nixpkgs.lib
// {
foreach = xs: f:
foldr recursiveUpdate {} (
if isList xs
then map f xs
else if isAttrs xs
then mapAttrsToList f xs
else throw "foreach: expected list or attrset but got ${typeOf xs}"
);
findModulesList = dir:
pipe dir [
builtins.readDir
(filterAttrs (name: type: type == "directory" || hasSuffix ".nix" name && name != "default.nix"))
attrNames
(map (f: "${dir}/${f}"))
];
};
in
{
inherit lib;
}
// lib.foreach lib.systems.flakeExposed (
system: let
pkgs = inputs.nixpkgs.legacyPackages.${system}.extend inputs.lux.overlays.default;
in {
legacyPackages.${system} = pkgs;
checks.${system} = {
};
devShells.${system}.default = pkgs.mkShell {
name = "devShell";
buildInputs = with pkgs; [
bun
yarn
lux-cli
emmylua-doc-cli
lua
groff
pandoc
];
};
}
);
}