-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
45 lines (44 loc) · 1.36 KB
/
Copy pathflake.nix
File metadata and controls
45 lines (44 loc) · 1.36 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
{
description = "pi-agent plugins monorepo";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs,
...
}: let
inherit (nixpkgs) lib;
eachSupportedSystem = f:
lib.genAttrs lib.systems.flakeExposed (
system:
f {
pkgs = import nixpkgs {inherit system;};
}
);
# Whole monorepo, minus build artifacts and VCS noise. Used both to read
# the pnpm lockfile and as the build source, so filtering keeps Nix from
# rebuilding on irrelevant churn. ".agents" holds vendored reference repos
# (git subtrees, ~48MB) that the build never reads; excluding it keeps the
# build source small and avoids rebuilds when those subtrees are updated.
src = lib.cleanSourceWith {
src = ./.;
filter = path: type:
!(builtins.elem (baseNameOf path) [
"node_modules"
"dist"
".turbo"
".direnv"
".git"
".agents"
"result"
".wt"
]);
};
in {
homeModules.default = import ./nix/home-module.nix {inherit self;};
packages = eachSupportedSystem ({pkgs}: import ./nix/packages {inherit pkgs src;});
devShells = eachSupportedSystem ({pkgs}: import ./nix/dev-shells.nix {inherit pkgs;});
formatter = eachSupportedSystem ({pkgs}: pkgs.alejandra);
};
}