1{
2 inputs = {
3 nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
4 systems.url = "github:nix-systems/default";
5 devenv.url = "github:cachix/devenv";
6 devenv.inputs.nixpkgs.follows = "nixpkgs";
7 rust-overlay.url = "github:oxalica/rust-overlay";
8 rust-overlay.inputs = { nixpkgs.follows = "nixpkgs"; };
9 zig-overlay.url = "github:mitchellh/zig-overlay";
10 zig-overlay.inputs.nixpkgs.follows = "nixpkgs";
11 };
12
13 nixConfig = {
14 extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
15 extra-substituters = "https://devenv.cachix.org";
16 };
17
18 outputs = {
19 self,
20 nixpkgs,
21 devenv,
22 systems,
23 ...
24 } @ inputs: let
25 forEachSystem = nixpkgs.lib.genAttrs (import systems);
26 in {
27 packages = forEachSystem (system: {
28 devenv-up = self.devShells.${system}.default.config.procfileScript;
29 });
30
31 devShells =
32 forEachSystem
33 (system: let
34 pkgs = nixpkgs.legacyPackages.${system};
35 in {
36 default = devenv.lib.mkShell {
37 inherit inputs pkgs;
38 modules = [
39 {
40 packages = with pkgs; [ pkgs.zls inputs.zig-overlay.packages.${pkgs.system}.default ];
41 languages.rust = {
42 enable = true;
43 channel = "nightly";
44 components = ["rustc" "cargo" "clippy" "rustfmt" "rust-analyzer"];
45 };
46 }
47 ];
48 };
49 });
50 };
51}