diff options
| author | seth <[email protected]> | 2023-05-21 18:11:53 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-05-21 18:11:53 -0400 |
| commit | d1878f3e55371affe603459c540954c631d6462f (patch) | |
| tree | cd7fbdef347569aa7ed57237d96539b1500dd774 /parts/toolchain.nix | |
| parent | 913f1bf789e4ad9d7bae13e13d318620cea6761b (diff) | |
feat: start using flake-parts + add nixos module
Diffstat (limited to 'parts/toolchain.nix')
| -rw-r--r-- | parts/toolchain.nix | 24 |
1 files changed, 24 insertions, 0 deletions
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; + }; + }; +} |
