-
Notifications
You must be signed in to change notification settings - Fork 7
/
flake.nix
49 lines (47 loc) · 1.07 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
49
{
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
fenix = {
url = "github:nix-community/fenix/staging";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "nixpkgs/nixos-unstable";
};
outputs = {
self,
fenix,
nixpkgs,
}: let
system = "x86_64-linux";
pkgs = import nixpkgs {
overlays = [fenix.overlays.default];
inherit system;
};
in {
packages."${system}".default = fenix.packages."${system}".minimal.toolchain;
devShells."${system}".default = pkgs.mkShell {
name = "rust";
packages = with pkgs; [
(fenix.packages."${system}".complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
cargo-expand
cargo-rdme
cargo-semver-checks
rust-analyzer-nightly
];
shellHook = ''exec fish'';
};
};
}