diff --git a/flake.nix b/flake.nix index 0b1a361..b7dd42c 100644 --- a/flake.nix +++ b/flake.nix @@ -11,5 +11,10 @@ path = ./fhs; description = "A simple flake but creating an fhs compliant environment"; }; + + rust = { + path = ./rust; + description = "A simple flake with an overlay for rust"; + }; }; } diff --git a/rust/.envrc b/rust/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/rust/.envrc @@ -0,0 +1 @@ +use flake diff --git a/rust/flake.nix b/rust/flake.nix new file mode 100644 index 0000000..8084cba --- /dev/null +++ b/rust/flake.nix @@ -0,0 +1,20 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + rust-overlay.url = "github:oxalica/rust-overlay"; + }; + + outputs = { nixpkgs, flake-utils, rust-overlay, ... }: flake-utils.lib.eachSystem [ + "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" + ] (system: let + pkgs = import nixpkgs { + overlays = [ rust-overlay.overlays.default ]; + inherit system; + }; + in { + devShells.default = pkgs.mkShell { + packages = [ ]; + }; + }); +}