-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
29 lines (27 loc) · 810 Bytes
/
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
{
inputs = {
asdf2nix.url = "github:sestrella/asdf2nix";
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
};
outputs = { self, asdf2nix, flake-utils, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
packages = asdf2nix.lib.packagesFromVersionsFile {
inherit system;
versionsFile = ./.tool-versions;
plugins = {
nodejs = {
hasVersion = { version, ... }: pkgs.nodejs_20.version == version;
packageFromVersion = _: pkgs.nodejs_20;
};
};
};
in
{
devShells.default = pkgs.mkShell {
buildInputs = [ packages.nodejs ];
};
});
}