-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
104 lines (93 loc) · 2.69 KB
/
flake.nix
File metadata and controls
104 lines (93 loc) · 2.69 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
description = "StackOne AI Node SDK development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
# Agent skills management
agent-skills.url = "github:Kyure-A/agent-skills-nix";
agent-skills.inputs.nixpkgs.follows = "nixpkgs";
# StackOne skills repository (non-flake)
stackone-skills.url = "github:StackOneHQ/skills";
stackone-skills.flake = false;
};
outputs =
{
nixpkgs,
agent-skills,
stackone-skills,
...
}:
let
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs systems;
# Agent skills configuration
agentLib = agent-skills.lib.agent-skills;
sources = {
stackone = {
path = stackone-skills;
subdir = ".";
};
};
catalog = agentLib.discoverCatalog sources;
allowlist = agentLib.allowlistFor {
inherit catalog sources;
enable = [
"orama-integration"
"release-please"
];
};
selection = agentLib.selectSkills {
inherit catalog allowlist sources;
skills = { };
};
in
{
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
bundle = agentLib.mkBundle { inherit pkgs selection; };
# Use symlink-tree instead of copy-tree for skills
localTargets = nixpkgs.lib.mapAttrs (
_: t: t // { structure = "symlink-tree"; }
) agentLib.defaultLocalTargets;
in
{
default = pkgs.mkShellNoCC {
buildInputs = with pkgs; [
# runtime
nodejs_24
pnpm_10
typescript-go
# formatting and linting tools
similarity
nixfmt
oxlint
oxfmt
# security
gitleaks
# git hooks
lefthook
];
shellHook = ''
echo "StackOne AI Node SDK development environment"
# Install dependencies only if node_modules/.pnpm/lock.yaml is older than pnpm-lock.yaml
if [ ! -f node_modules/.pnpm/lock.yaml ] || [ pnpm-lock.yaml -nt node_modules/.pnpm/lock.yaml ]; then
echo "Installing dependencies..."
pnpm install --frozen-lockfile
fi
# Install lefthook git hooks
lefthook install > /dev/null 2>&1
''
+ agentLib.mkShellHook {
inherit pkgs bundle;
targets = localTargets;
};
};
}
);
};
}