-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
44 lines (40 loc) · 1.06 KB
/
flake.nix
File metadata and controls
44 lines (40 loc) · 1.06 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
{
description = "Rust development template";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
git-hooks-nix.url = "github:cachix/git-hooks.nix";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs =
inputs@{
flake-parts,
rust-overlay,
nixpkgs,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"x86_64-darwin"
];
imports = [
./nix/lib.nix
./nix/devshell.nix
./nix/formatting.nix
./nix/git-hooks.nix
];
perSystem =
{ system, ... }:
{
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};
};
};
}