From d1878f3e55371affe603459c540954c631d6462f Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 21 May 2023 18:11:53 -0400 Subject: feat: start using flake-parts + add nixos module --- parts/toolchain.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 parts/toolchain.nix (limited to 'parts/toolchain.nix') diff --git a/parts/toolchain.nix b/parts/toolchain.nix new file mode 100644 index 0000000..e2201f9 --- /dev/null +++ b/parts/toolchain.nix @@ -0,0 +1,24 @@ +{inputs, ...}: { + perSystem = {system, ...}: let + pkgs = import inputs.nixpkgs { + inherit system; + overlays = [inputs.fenix.overlays.default]; + }; + + toolchain = with pkgs.fenix; + with stable; + combine [ + cargo + rustc + rustfmt + clippy + targets."x86_64-unknown-linux-musl".stable.rust-std + ]; + in { + _module.args = { + inherit pkgs toolchain; + + craneLib = (inputs.crane.mkLib pkgs).overrideToolchain toolchain; + }; + }; +} -- cgit v1.2.3