-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
48 lines (46 loc) · 1.25 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
{
description = "amateurguitar toolbox";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, fenix, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ fenix.overlays.default ];
pkgs = import nixpkgs {
inherit system overlays;
};
toolchain = fenix.packages.${system}.combine [
fenix.packages.${system}.stable.rustc
fenix.packages.${system}.stable.cargo
fenix.packages.${system}.targets.wasm32-unknown-unknown.stable.rust-std
];
in with pkgs; {
devShell = mkShell {
buildInputs = [
# rust toolchain
toolchain
# rust native lib
pkg-config
openssl
# utility
just
simple-http-server
# tailwindcss
# node tools
nodejs
nodePackages.npm
nodePackages.tailwindcss
];
shellHook = ''
alias c=cargo
'';
};
}
);
}