mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
move flake to own repository
This commit is contained in:
commit
84b5cd816c
55 changed files with 13637 additions and 0 deletions
36
templates/rust_flake.nix
Normal file
36
templates/rust_flake.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# flake.nix
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
};
|
||||
|
||||
outputs = {self, nixpkgs, rust-overlay, ...}: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [rust-overlay.overlays.default];
|
||||
};
|
||||
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./toolchain.toml;
|
||||
in {
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
|
||||
packages = with pkgs; [
|
||||
cargo
|
||||
clippy
|
||||
rustc
|
||||
rustfmt
|
||||
toolchain
|
||||
rust-analyzer-unwrapped
|
||||
rust-analyzer
|
||||
];
|
||||
env = {
|
||||
RUST_BACKTRACE = "full";
|
||||
};
|
||||
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
|
||||
|
||||
# ...
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue